Documentation ¶
Index ¶
- Variables
- func AddCachedHook(hookPoint boil.HookPoint, cachedHook CachedHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func CachedExists(ctx context.Context, exec boil.ContextExecutor, pK int) (bool, error)
- func Cacheds(mods ...qm.QueryMod) cachedQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Cached
- func (o *Cached) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Cached) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Cached) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Cached) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Cached) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type CachedHook
- type CachedSlice
- type M
- type User
- 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) 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 CachedColumns = struct { PK string Owner string Repo string Tag string }{ PK: "pk", Owner: "owner", Repo: "repo", Tag: "tag", }
var CachedRels = struct {
}{}
CachedRels is where relationship names are stored.
var CachedWhere = struct { PK whereHelperint Owner whereHelperstring Repo whereHelperstring Tag whereHelpernull_String }{ PK: whereHelperint{/* contains filtered or unexported fields */}, Owner: whereHelperstring{/* contains filtered or unexported fields */}, Repo: whereHelperstring{/* contains filtered or unexported fields */}, Tag: whereHelpernull_String{/* contains filtered or unexported fields */}, }
var ErrSyncFail = errors.New("record: 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 { Cached string Users string }{ Cached: "cached", Users: "users", }
var UserColumns = struct { ID string Name string SlackID string }{ ID: "id", Name: "name", SlackID: "slack_id", }
var UserRels = struct {
}{}
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint Name whereHelperstring SlackID whereHelpernull_String }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, SlackID: whereHelpernull_String{/* contains filtered or unexported fields */}, }
Functions ¶
func AddCachedHook ¶
func AddCachedHook(hookPoint boil.HookPoint, cachedHook CachedHook)
AddCachedHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func CachedExists ¶
CachedExists checks if the Cached row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Cached ¶
type Cached struct { PK int `boil:"pk" json:"pk" toml:"pk" yaml:"pk"` Owner string `boil:"owner" json:"owner" toml:"owner" yaml:"owner"` Repo string `boil:"repo" json:"repo" toml:"repo" yaml:"repo"` Tag null.String `boil:"tag" json:"tag,omitempty" toml:"tag" yaml:"tag,omitempty"` R *cachedR `boil:"-" json:"-" toml:"-" yaml:"-"` L cachedL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Cached is an object representing the database table.
func FindCached ¶
func FindCached(ctx context.Context, exec boil.ContextExecutor, pK int, selectCols ...string) (*Cached, error)
FindCached retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Cached) Delete ¶
Delete deletes a single Cached record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Cached) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Cached) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Cached) Update ¶
func (o *Cached) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Cached. 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 (*Cached) Upsert ¶
func (o *Cached) 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 CachedHook ¶
CachedHook is the signature for custom Cached hook methods
type CachedSlice ¶
type CachedSlice []*Cached
CachedSlice is an alias for a slice of pointers to Cached. This should generally be used opposed to []Cached.
func (CachedSlice) DeleteAll ¶
func (o CachedSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CachedSlice) ReloadAll ¶
func (o *CachedSlice) 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 (CachedSlice) UpdateAll ¶
func (o CachedSlice) 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 int `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` SlackID null.String `boil:"slack_id" json:"slack_id,omitempty" toml:"slack_id" yaml:"slack_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(ctx context.Context, exec boil.ContextExecutor, iD int, 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) 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.