models

package
v0.0.0-...-9da61a2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 16 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var ProjectColumns = struct {
	ID        string
	Name      string
	RepoName  string
	RepoOwner string
}{
	ID:        "id",
	Name:      "name",
	RepoName:  "repo_name",
	RepoOwner: "repo_owner",
}
View Source
var ProjectRels = struct {
	Contributors string
	PullRequests string
}{
	Contributors: "Contributors",
	PullRequests: "PullRequests",
}

ProjectRels is where relationship names are stored.

View Source
var ProjectWhere = struct {
	ID        whereHelperint64
	Name      whereHelperstring
	RepoName  whereHelperstring
	RepoOwner whereHelperstring
}{
	ID:        whereHelperint64{/* contains filtered or unexported fields */},
	Name:      whereHelperstring{/* contains filtered or unexported fields */},
	RepoName:  whereHelperstring{/* contains filtered or unexported fields */},
	RepoOwner: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var PullRequestColumns = struct {
	ID        string
	UserID    string
	ProjectID string
	Title     string
	URL       string
	Number    string
	GithubID  string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	UserID:    "user_id",
	ProjectID: "project_id",
	Title:     "title",
	URL:       "url",
	Number:    "number",
	GithubID:  "github_id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var PullRequestRels = struct {
	Author     string
	Project    string
	Approvers  string
	Commenters string
	Idlers     string
	Reviewers  string
}{
	Author:     "Author",
	Project:    "Project",
	Approvers:  "Approvers",
	Commenters: "Commenters",
	Idlers:     "Idlers",
	Reviewers:  "Reviewers",
}

PullRequestRels is where relationship names are stored.

View Source
var PullRequestWhere = struct {
	ID        whereHelperint64
	UserID    whereHelperint64
	ProjectID whereHelperint64
	Title     whereHelperstring
	URL       whereHelperstring
	Number    whereHelperint64
	GithubID  whereHelperint64
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperint64{/* contains filtered or unexported fields */},
	UserID:    whereHelperint64{/* contains filtered or unexported fields */},
	ProjectID: whereHelperint64{/* contains filtered or unexported fields */},
	Title:     whereHelperstring{/* contains filtered or unexported fields */},
	URL:       whereHelperstring{/* contains filtered or unexported fields */},
	Number:    whereHelperint64{/* contains filtered or unexported fields */},
	GithubID:  whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var TableNames = struct {
	Approvers    string
	Commenters   string
	Idlers       string
	ProjectUsers string
	Projects     string
	PullRequests string
	Reviewers    string
	Users        string
}{
	Approvers:    "approvers",
	Commenters:   "commenters",
	Idlers:       "idlers",
	ProjectUsers: "project_users",
	Projects:     "projects",
	PullRequests: "pull_requests",
	Reviewers:    "reviewers",
	Users:        "users",
}
View Source
var UserColumns = struct {
	ID       string
	Username string
	GithubID string
	Metadata string
}{
	ID:       "id",
	Username: "username",
	GithubID: "github_id",
	Metadata: "metadata",
}
View Source
var UserRels = struct {
	ApprovedPullRequests  string
	CommentedPullRequests string
	IdledPullRequests     string
	Projects              string
	AuthoredPullRequests  string
	RequestedReviews      string
}{
	ApprovedPullRequests:  "ApprovedPullRequests",
	CommentedPullRequests: "CommentedPullRequests",
	IdledPullRequests:     "IdledPullRequests",
	Projects:              "Projects",
	AuthoredPullRequests:  "AuthoredPullRequests",
	RequestedReviews:      "RequestedReviews",
}

UserRels is where relationship names are stored.

View Source
var UserWhere = struct {
	ID       whereHelperint64
	Username whereHelperstring
	GithubID whereHelperint64
	Metadata whereHelpertypes_JSON
}{
	ID:       whereHelperint64{/* contains filtered or unexported fields */},
	Username: whereHelperstring{/* contains filtered or unexported fields */},
	GithubID: whereHelperint64{/* contains filtered or unexported fields */},
	Metadata: whereHelpertypes_JSON{/* contains filtered or unexported fields */},
}

Functions

func AddProjectHook

func AddProjectHook(hookPoint boil.HookPoint, projectHook ProjectHook)

AddProjectHook registers your hook function for all future operations.

func AddPullRequestHook

func AddPullRequestHook(hookPoint boil.HookPoint, pullRequestHook PullRequestHook)

AddPullRequestHook registers your hook function for all future operations.

func AddUserHook

func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)

AddUserHook registers your hook function for all future operations.

func NewQuery

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

NewQuery initializes a new Query using the passed in QueryMods

func ProjectExists

func ProjectExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

ProjectExists checks if the Project row exists.

func Projects

func Projects(mods ...qm.QueryMod) projectQuery

Projects retrieves all the records using an executor.

func PullRequestExists

func PullRequestExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

PullRequestExists checks if the PullRequest row exists.

func PullRequests

func PullRequests(mods ...qm.QueryMod) pullRequestQuery

PullRequests retrieves all the records using an executor.

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

UserExists checks if the User row exists.

func Users

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

Users retrieves all the records using an executor.

Types

type M

type M map[string]interface{}

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

type Project

type Project struct {
	ID        int64  `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name      string `boil:"name" json:"name" toml:"name" yaml:"name"`
	RepoName  string `boil:"repo_name" json:"repo_name" toml:"repo_name" yaml:"repo_name"`
	RepoOwner string `boil:"repo_owner" json:"repo_owner" toml:"repo_owner" yaml:"repo_owner"`

	R *projectR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L projectL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Project is an object representing the database table.

func FindProject

func FindProject(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Project, error)

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

func (*Project) AddContributors

func (o *Project) AddContributors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddContributors adds the given related objects to the existing relationships of the project, optionally inserting them as new records. Appends related to o.R.Contributors. Sets related.R.Projects appropriately.

func (*Project) AddPullRequests

func (o *Project) AddPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

AddPullRequests adds the given related objects to the existing relationships of the project, optionally inserting them as new records. Appends related to o.R.PullRequests. Sets related.R.Project appropriately.

func (*Project) Contributors

func (o *Project) Contributors(mods ...qm.QueryMod) userQuery

Contributors retrieves all the user's Users with an executor via id column.

func (*Project) Delete

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

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

func (*Project) Insert

func (o *Project) 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 (*Project) PullRequests

func (o *Project) PullRequests(mods ...qm.QueryMod) pullRequestQuery

PullRequests retrieves all the pull_request's PullRequests with an executor.

func (*Project) Reload

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

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

func (*Project) RemoveContributors

func (o *Project) RemoveContributors(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveContributors relationships from objects passed in. Removes related items from R.Contributors (uses pointer comparison, removal does not keep order) Sets related.R.Projects.

func (*Project) SetContributors

func (o *Project) SetContributors(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetContributors removes all previously related items of the project replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Projects's Contributors accordingly. Replaces o.R.Contributors with related. Sets related.R.Projects's Contributors accordingly.

func (*Project) Update

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

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

func (o *Project) 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 ProjectHook

type ProjectHook func(context.Context, boil.ContextExecutor, *Project) error

ProjectHook is the signature for custom Project hook methods

type ProjectSlice

type ProjectSlice []*Project

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

func (ProjectSlice) DeleteAll

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

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

func (*ProjectSlice) ReloadAll

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

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

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

type PullRequest

type PullRequest 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"`
	ProjectID int64     `boil:"project_id" json:"project_id" toml:"project_id" yaml:"project_id"`
	Title     string    `boil:"title" json:"title" toml:"title" yaml:"title"`
	URL       string    `boil:"url" json:"url" toml:"url" yaml:"url"`
	Number    int64     `boil:"number" json:"number" toml:"number" yaml:"number"`
	GithubID  int64     `boil:"github_id" json:"github_id" toml:"github_id" yaml:"github_id"`
	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"`

	R *pullRequestR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L pullRequestL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

PullRequest is an object representing the database table.

func FindPullRequest

func FindPullRequest(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*PullRequest, error)

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

func (*PullRequest) AddApprovers

func (o *PullRequest) AddApprovers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddApprovers adds the given related objects to the existing relationships of the pull_request, optionally inserting them as new records. Appends related to o.R.Approvers. Sets related.R.ApprovedPullRequests appropriately.

func (*PullRequest) AddCommenters

func (o *PullRequest) AddCommenters(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddCommenters adds the given related objects to the existing relationships of the pull_request, optionally inserting them as new records. Appends related to o.R.Commenters. Sets related.R.CommentedPullRequests appropriately.

func (*PullRequest) AddIdlers

func (o *PullRequest) AddIdlers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddIdlers adds the given related objects to the existing relationships of the pull_request, optionally inserting them as new records. Appends related to o.R.Idlers. Sets related.R.IdledPullRequests appropriately.

func (*PullRequest) AddReviewers

func (o *PullRequest) AddReviewers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

AddReviewers adds the given related objects to the existing relationships of the pull_request, optionally inserting them as new records. Appends related to o.R.Reviewers. Sets related.R.RequestedReviews appropriately.

func (*PullRequest) Approvers

func (o *PullRequest) Approvers(mods ...qm.QueryMod) userQuery

Approvers retrieves all the user's Users with an executor via id column.

func (*PullRequest) Author

func (o *PullRequest) Author(mods ...qm.QueryMod) userQuery

Author pointed to by the foreign key.

func (*PullRequest) Commenters

func (o *PullRequest) Commenters(mods ...qm.QueryMod) userQuery

Commenters retrieves all the user's Users with an executor via id column.

func (*PullRequest) Delete

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

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

func (*PullRequest) Idlers

func (o *PullRequest) Idlers(mods ...qm.QueryMod) userQuery

Idlers retrieves all the user's Users with an executor via id column.

func (*PullRequest) Insert

func (o *PullRequest) 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 (*PullRequest) Project

func (o *PullRequest) Project(mods ...qm.QueryMod) projectQuery

Project pointed to by the foreign key.

func (*PullRequest) Reload

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

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

func (*PullRequest) RemoveApprovers

func (o *PullRequest) RemoveApprovers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveApprovers relationships from objects passed in. Removes related items from R.Approvers (uses pointer comparison, removal does not keep order) Sets related.R.ApprovedPullRequests.

func (*PullRequest) RemoveCommenters

func (o *PullRequest) RemoveCommenters(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveCommenters relationships from objects passed in. Removes related items from R.Commenters (uses pointer comparison, removal does not keep order) Sets related.R.CommentedPullRequests.

func (*PullRequest) RemoveIdlers

func (o *PullRequest) RemoveIdlers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveIdlers relationships from objects passed in. Removes related items from R.Idlers (uses pointer comparison, removal does not keep order) Sets related.R.IdledPullRequests.

func (*PullRequest) RemoveReviewers

func (o *PullRequest) RemoveReviewers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error

RemoveReviewers relationships from objects passed in. Removes related items from R.Reviewers (uses pointer comparison, removal does not keep order) Sets related.R.RequestedReviews.

func (*PullRequest) Reviewers

func (o *PullRequest) Reviewers(mods ...qm.QueryMod) userQuery

Reviewers retrieves all the user's Users with an executor via id column.

func (*PullRequest) SetApprovers

func (o *PullRequest) SetApprovers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetApprovers removes all previously related items of the pull_request replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.ApprovedPullRequests's Approvers accordingly. Replaces o.R.Approvers with related. Sets related.R.ApprovedPullRequests's Approvers accordingly.

func (*PullRequest) SetAuthor

func (o *PullRequest) SetAuthor(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetAuthor of the pullRequest to the related item. Sets o.R.Author to related. Adds o to related.R.AuthoredPullRequests.

func (*PullRequest) SetCommenters

func (o *PullRequest) SetCommenters(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetCommenters removes all previously related items of the pull_request replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.CommentedPullRequests's Commenters accordingly. Replaces o.R.Commenters with related. Sets related.R.CommentedPullRequests's Commenters accordingly.

func (*PullRequest) SetIdlers

func (o *PullRequest) SetIdlers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetIdlers removes all previously related items of the pull_request replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.IdledPullRequests's Idlers accordingly. Replaces o.R.Idlers with related. Sets related.R.IdledPullRequests's Idlers accordingly.

func (*PullRequest) SetProject

func (o *PullRequest) SetProject(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Project) error

SetProject of the pullRequest to the related item. Sets o.R.Project to related. Adds o to related.R.PullRequests.

func (*PullRequest) SetReviewers

func (o *PullRequest) SetReviewers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error

SetReviewers removes all previously related items of the pull_request replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.RequestedReviews's Reviewers accordingly. Replaces o.R.Reviewers with related. Sets related.R.RequestedReviews's Reviewers accordingly.

func (*PullRequest) Update

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

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

func (o *PullRequest) 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 PullRequestHook

type PullRequestHook func(context.Context, boil.ContextExecutor, *PullRequest) error

PullRequestHook is the signature for custom PullRequest hook methods

type PullRequestSlice

type PullRequestSlice []*PullRequest

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

func (PullRequestSlice) DeleteAll

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

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

func (*PullRequestSlice) ReloadAll

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

func (o PullRequestSlice) 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       int64      `boil:"id" json:"id" toml:"id" yaml:"id"`
	Username string     `boil:"username" json:"username" toml:"username" yaml:"username"`
	GithubID int64      `boil:"github_id" json:"github_id" toml:"github_id" yaml:"github_id"`
	Metadata types.JSON `boil:"metadata" json:"metadata" toml:"metadata" yaml:"metadata"`

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

func (o *User) AddApprovedPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

AddApprovedPullRequests adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.ApprovedPullRequests. Sets related.R.Approvers appropriately.

func (*User) AddAuthoredPullRequests

func (o *User) AddAuthoredPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

AddAuthoredPullRequests adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.AuthoredPullRequests. Sets related.R.Author appropriately.

func (*User) AddCommentedPullRequests

func (o *User) AddCommentedPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

AddCommentedPullRequests adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.CommentedPullRequests. Sets related.R.Commenters appropriately.

func (*User) AddIdledPullRequests

func (o *User) AddIdledPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

AddIdledPullRequests adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.IdledPullRequests. Sets related.R.Idlers appropriately.

func (*User) AddProjects

func (o *User) AddProjects(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Project) error

AddProjects adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Projects. Sets related.R.Contributors appropriately.

func (*User) AddRequestedReviews

func (o *User) AddRequestedReviews(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

AddRequestedReviews adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.RequestedReviews. Sets related.R.Reviewers appropriately.

func (*User) ApprovedPullRequests

func (o *User) ApprovedPullRequests(mods ...qm.QueryMod) pullRequestQuery

ApprovedPullRequests retrieves all the pull_request's PullRequests with an executor via id column.

func (*User) AuthoredPullRequests

func (o *User) AuthoredPullRequests(mods ...qm.QueryMod) pullRequestQuery

AuthoredPullRequests retrieves all the pull_request's PullRequests with an executor via user_id column.

func (*User) CommentedPullRequests

func (o *User) CommentedPullRequests(mods ...qm.QueryMod) pullRequestQuery

CommentedPullRequests retrieves all the pull_request's PullRequests with an executor via id column.

func (*User) Delete

func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, 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) IdledPullRequests

func (o *User) IdledPullRequests(mods ...qm.QueryMod) pullRequestQuery

IdledPullRequests retrieves all the pull_request's PullRequests with an executor via id column.

func (*User) Insert

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

func (o *User) Projects(mods ...qm.QueryMod) projectQuery

Projects retrieves all the project's Projects with an executor.

func (*User) Reload

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

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

func (*User) RemoveApprovedPullRequests

func (o *User) RemoveApprovedPullRequests(ctx context.Context, exec boil.ContextExecutor, related ...*PullRequest) error

RemoveApprovedPullRequests relationships from objects passed in. Removes related items from R.ApprovedPullRequests (uses pointer comparison, removal does not keep order) Sets related.R.Approvers.

func (*User) RemoveCommentedPullRequests

func (o *User) RemoveCommentedPullRequests(ctx context.Context, exec boil.ContextExecutor, related ...*PullRequest) error

RemoveCommentedPullRequests relationships from objects passed in. Removes related items from R.CommentedPullRequests (uses pointer comparison, removal does not keep order) Sets related.R.Commenters.

func (*User) RemoveIdledPullRequests

func (o *User) RemoveIdledPullRequests(ctx context.Context, exec boil.ContextExecutor, related ...*PullRequest) error

RemoveIdledPullRequests relationships from objects passed in. Removes related items from R.IdledPullRequests (uses pointer comparison, removal does not keep order) Sets related.R.Idlers.

func (*User) RemoveProjects

func (o *User) RemoveProjects(ctx context.Context, exec boil.ContextExecutor, related ...*Project) error

RemoveProjects relationships from objects passed in. Removes related items from R.Projects (uses pointer comparison, removal does not keep order) Sets related.R.Contributors.

func (*User) RemoveRequestedReviews

func (o *User) RemoveRequestedReviews(ctx context.Context, exec boil.ContextExecutor, related ...*PullRequest) error

RemoveRequestedReviews relationships from objects passed in. Removes related items from R.RequestedReviews (uses pointer comparison, removal does not keep order) Sets related.R.Reviewers.

func (*User) RequestedReviews

func (o *User) RequestedReviews(mods ...qm.QueryMod) pullRequestQuery

RequestedReviews retrieves all the pull_request's PullRequests with an executor via id column.

func (*User) SetApprovedPullRequests

func (o *User) SetApprovedPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

SetApprovedPullRequests removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Approvers's ApprovedPullRequests accordingly. Replaces o.R.ApprovedPullRequests with related. Sets related.R.Approvers's ApprovedPullRequests accordingly.

func (*User) SetCommentedPullRequests

func (o *User) SetCommentedPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

SetCommentedPullRequests removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Commenters's CommentedPullRequests accordingly. Replaces o.R.CommentedPullRequests with related. Sets related.R.Commenters's CommentedPullRequests accordingly.

func (*User) SetIdledPullRequests

func (o *User) SetIdledPullRequests(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

SetIdledPullRequests removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Idlers's IdledPullRequests accordingly. Replaces o.R.IdledPullRequests with related. Sets related.R.Idlers's IdledPullRequests accordingly.

func (*User) SetProjects

func (o *User) SetProjects(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Project) error

SetProjects removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Contributors's Projects accordingly. Replaces o.R.Projects with related. Sets related.R.Contributors's Projects accordingly.

func (*User) SetRequestedReviews

func (o *User) SetRequestedReviews(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*PullRequest) error

SetRequestedReviews removes all previously related items of the user replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Reviewers's RequestedReviews accordingly. Replaces o.R.RequestedReviews with related. Sets related.R.Reviewers's RequestedReviews accordingly.

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 UserHook

type UserHook func(context.Context, boil.ContextExecutor, *User) error

UserHook is the signature for custom User hook methods

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(ctx context.Context, exec boil.ContextExecutor) (int64, error)

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

func (*UserSlice) ReloadAll

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

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

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

Jump to

Keyboard shortcuts

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