Documentation ¶
Index ¶
- Variables
- func AddRoleHook(hookPoint boil.HookPoint, roleHook RoleHook)
- func AddRoleTargetHook(hookPoint boil.HookPoint, roleTargetHook RoleTargetHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func RoleExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func RoleTargetExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func RoleTargets(mods ...qm.QueryMod) roleTargetQuery
- func Roles(mods ...qm.QueryMod) roleQuery
- type M
- type Role
- func (o *Role) AddRoleTargets(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Role) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Role) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Role) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Role) RoleTargets(mods ...qm.QueryMod) roleTargetQuery
- func (o *Role) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Role) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type RoleHook
- type RoleSlice
- type RoleTarget
- func (o *RoleTarget) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *RoleTarget) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *RoleTarget) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *RoleTarget) Role(mods ...qm.QueryMod) roleQuery
- func (o *RoleTarget) SetRole(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Role) error
- func (o *RoleTarget) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *RoleTarget) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type RoleTargetHook
- type RoleTargetSlice
Constants ¶
This section is empty.
Variables ¶
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 RoleColumns = struct { ID string GuildID string Name string Permissions string }{ ID: "id", GuildID: "guild_id", Name: "name", Permissions: "permissions", }
var RoleRels = struct { RoleTargets string }{ RoleTargets: "RoleTargets", }
RoleRels is where relationship names are stored.
var RoleTargetColumns = struct { ID string Target string RoleID string }{ ID: "id", Target: "target", RoleID: "role_id", }
var RoleTargetRels = struct { Role string }{ Role: "Role", }
RoleTargetRels is where relationship names are stored.
var RoleTargetWhere = struct { ID whereHelperint64 Target whereHelperstring RoleID whereHelperint64 }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Target: whereHelperstring{/* contains filtered or unexported fields */}, RoleID: whereHelperint64{/* contains filtered or unexported fields */}, }
var RoleWhere = struct { ID whereHelperint64 GuildID whereHelpernull_String Name whereHelperstring Permissions whereHelpertypes_Int64Array }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, GuildID: whereHelpernull_String{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, Permissions: whereHelpertypes_Int64Array{/* contains filtered or unexported fields */}, }
var TableNames = struct { RoleTargets string Roles string }{ RoleTargets: "role_targets", Roles: "roles", }
Functions ¶
func AddRoleHook ¶
AddRoleHook registers your hook function for all future operations.
func AddRoleTargetHook ¶
func AddRoleTargetHook(hookPoint boil.HookPoint, roleTargetHook RoleTargetHook)
AddRoleTargetHook registers your hook function for all future operations.
func RoleExists ¶
RoleExists checks if the Role row exists.
func RoleTargetExists ¶
RoleTargetExists checks if the RoleTarget row exists.
func RoleTargets ¶
RoleTargets 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 Role ¶
type Role struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` GuildID null.String `boil:"guild_id" json:"guild_id,omitempty" toml:"guild_id" yaml:"guild_id,omitempty"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` Permissions types.Int64Array `boil:"permissions" json:"permissions" toml:"permissions" yaml:"permissions"` R *roleR `boil:"-" json:"-" toml:"-" yaml:"-"` L roleL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Role is an object representing the database table.
func FindRole ¶
func FindRole(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Role, error)
FindRole retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Role) AddRoleTargets ¶
func (o *Role) AddRoleTargets(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*RoleTarget) error
AddRoleTargets adds the given related objects to the existing relationships of the role, optionally inserting them as new records. Appends related to o.R.RoleTargets. Sets related.R.Role appropriately.
func (*Role) Delete ¶
Delete deletes a single Role record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Role) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Role) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Role) RoleTargets ¶
RoleTargets retrieves all the role_target's RoleTargets with an executor.
func (*Role) Update ¶
func (o *Role) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Role. 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 (*Role) Upsert ¶
func (o *Role) 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 RoleSlice ¶
type RoleSlice []*Role
RoleSlice is an alias for a slice of pointers to Role. This should generally be used opposed to []Role.
type RoleTarget ¶
type RoleTarget struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Target string `boil:"target" json:"target" toml:"target" yaml:"target"` RoleID int64 `boil:"role_id" json:"role_id" toml:"role_id" yaml:"role_id"` R *roleTargetR `boil:"-" json:"-" toml:"-" yaml:"-"` L roleTargetL `boil:"-" json:"-" toml:"-" yaml:"-"` }
RoleTarget is an object representing the database table.
func FindRoleTarget ¶
func FindRoleTarget(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*RoleTarget, error)
FindRoleTarget retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*RoleTarget) Delete ¶
func (o *RoleTarget) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single RoleTarget record with an executor. Delete will match against the primary key column to find the record to delete.
func (*RoleTarget) Insert ¶
func (o *RoleTarget) 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 (*RoleTarget) Reload ¶
func (o *RoleTarget) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*RoleTarget) Role ¶
func (o *RoleTarget) Role(mods ...qm.QueryMod) roleQuery
Role pointed to by the foreign key.
func (*RoleTarget) SetRole ¶
func (o *RoleTarget) SetRole(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Role) error
SetRole of the roleTarget to the related item. Sets o.R.Role to related. Adds o to related.R.RoleTargets.
func (*RoleTarget) Update ¶
func (o *RoleTarget) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the RoleTarget. 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 (*RoleTarget) Upsert ¶
func (o *RoleTarget) 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 RoleTargetHook ¶
type RoleTargetHook func(context.Context, boil.ContextExecutor, *RoleTarget) error
RoleTargetHook is the signature for custom RoleTarget hook methods
type RoleTargetSlice ¶
type RoleTargetSlice []*RoleTarget
RoleTargetSlice is an alias for a slice of pointers to RoleTarget. This should generally be used opposed to []RoleTarget.
func (RoleTargetSlice) DeleteAll ¶
func (o RoleTargetSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*RoleTargetSlice) ReloadAll ¶
func (o *RoleTargetSlice) 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 (RoleTargetSlice) UpdateAll ¶
func (o RoleTargetSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.