Documentation
¶
Index ¶
- Variables
- func AddGroupHook(hookPoint boil.HookPoint, groupHook GroupHook)
- func AddJWTKeyHook(hookPoint boil.HookPoint, jwtKeyHook JWTKeyHook)
- func AddMigrationHook(hookPoint boil.HookPoint, migrationHook MigrationHook)
- func AddPasswordHook(hookPoint boil.HookPoint, passwordHook PasswordHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func GroupExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Groups(mods ...qm.QueryMod) groupQuery
- func JWTKeyExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func JWTKeys(mods ...qm.QueryMod) jwtKeyQuery
- func MigrationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Migrations(mods ...qm.QueryMod) migrationQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PasswordExists(ctx context.Context, exec boil.ContextExecutor, userID int) (bool, error)
- func Passwords(mods ...qm.QueryMod) passwordQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Group
- func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Group) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Group) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Group) RemoveUsers(ctx context.Context, exec boil.ContextExecutor, related ...*User) error
- func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
- func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Group) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Group) Users(mods ...qm.QueryMod) userQuery
- type GroupHook
- type GroupSlice
- type JWTKey
- func (o *JWTKey) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *JWTKey) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *JWTKey) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *JWTKey) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *JWTKey) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type JWTKeyHook
- type JWTKeySlice
- type M
- type Migration
- func (o *Migration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Migration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Migration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Migration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Migration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type MigrationHook
- type MigrationSlice
- type Password
- func (o *Password) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Password) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Password) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Password) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Password) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Password) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Password) User(mods ...qm.QueryMod) userQuery
- type PasswordHook
- type PasswordSlice
- type User
- func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) Groups(mods ...qm.QueryMod) groupQuery
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Password(mods ...qm.QueryMod) passwordQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
- func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
- func (o *User) SetPassword(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Password) 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 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 GroupColumns = struct { ID string CreatedAt string UpdatedAt string Name string }{ ID: "id", CreatedAt: "created_at", UpdatedAt: "updated_at", Name: "name", }
var GroupRels = struct { Users string }{ Users: "Users", }
GroupRels is where relationship names are stored.
var GroupWhere = struct { ID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Name whereHelperstring }{ ID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, }
var JWTKeyColumns = struct { ID string PublicKey string CreatedAt string }{ ID: "id", PublicKey: "public_key", CreatedAt: "created_at", }
var JWTKeyRels = struct {
}{}
JWTKeyRels is where relationship names are stored.
var JWTKeyWhere = struct { ID whereHelperint PublicKey whereHelper__byte CreatedAt whereHelpertime_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, PublicKey: whereHelper__byte{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var MigrationColumns = struct { ID string AppliedAt string }{ ID: "id", AppliedAt: "applied_at", }
var MigrationRels = struct {
}{}
MigrationRels is where relationship names are stored.
var MigrationWhere = struct { ID whereHelperstring AppliedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, AppliedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var PasswordColumns = struct { UserID string CreatedAt string UpdatedAt string Salt string Hash string }{ UserID: "user_id", CreatedAt: "created_at", UpdatedAt: "updated_at", Salt: "salt", Hash: "hash", }
var PasswordRels = struct { User string }{ User: "User", }
PasswordRels is where relationship names are stored.
var PasswordWhere = struct { UserID whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Salt whereHelper__byte Hash whereHelper__byte }{ UserID: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Salt: whereHelper__byte{/* contains filtered or unexported fields */}, Hash: whereHelper__byte{/* contains filtered or unexported fields */}, }
var TableNames = struct { Groups string JWTKeys string Migrations string Passwords string UserGroups string Users string }{ Groups: "groups", JWTKeys: "jwt_keys", Migrations: "migrations", Passwords: "passwords", UserGroups: "user_groups", Users: "users", }
var UserColumns = struct { ID string Email string Name string CreatedAt string UpdatedAt string }{ ID: "id", Email: "email", Name: "name", CreatedAt: "created_at", UpdatedAt: "updated_at", }
var UserRels = struct { Password string Groups string }{ Password: "Password", Groups: "Groups", }
UserRels is where relationship names are stored.
var UserWhere = struct { ID whereHelperint Email whereHelperstring Name whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Email: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddGroupHook ¶
AddGroupHook registers your hook function for all future operations.
func AddJWTKeyHook ¶
func AddJWTKeyHook(hookPoint boil.HookPoint, jwtKeyHook JWTKeyHook)
AddJWTKeyHook registers your hook function for all future operations.
func AddMigrationHook ¶
func AddMigrationHook(hookPoint boil.HookPoint, migrationHook MigrationHook)
AddMigrationHook registers your hook function for all future operations.
func AddPasswordHook ¶
func AddPasswordHook(hookPoint boil.HookPoint, passwordHook PasswordHook)
AddPasswordHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func GroupExists ¶
GroupExists checks if the Group row exists.
func JWTKeyExists ¶
JWTKeyExists checks if the JWTKey row exists.
func MigrationExists ¶
MigrationExists checks if the Migration row exists.
func Migrations ¶
Migrations retrieves all the records using an executor.
func PasswordExists ¶
PasswordExists checks if the Password row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Group ¶
type Group struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"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"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
R *groupR `boil:"-" json:"-" toml:"-" yaml:"-"`
L groupL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Group is an object representing the database table.
func FindGroup ¶
func FindGroup(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*Group, error)
FindGroup retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Group) AddUsers ¶
func (o *Group) AddUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
AddUsers adds the given related objects to the existing relationships of the group, optionally inserting them as new records. Appends related to o.R.Users. Sets related.R.Groups appropriately.
func (*Group) Delete ¶
Delete deletes a single Group record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Group) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Group) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Group) RemoveUsers ¶
RemoveUsers relationships from objects passed in. Removes related items from R.Users (uses pointer comparison, removal does not keep order) Sets related.R.Groups.
func (*Group) SetUsers ¶
func (o *Group) SetUsers(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*User) error
SetUsers removes all previously related items of the group replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Groups's Users accordingly. Replaces o.R.Users with related. Sets related.R.Groups's Users accordingly.
func (*Group) Update ¶
func (o *Group) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Group. 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 (*Group) Upsert ¶
func (o *Group) 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 GroupSlice ¶
type GroupSlice []*Group
GroupSlice is an alias for a slice of pointers to Group. This should generally be used opposed to []Group.
func (GroupSlice) DeleteAll ¶
func (o GroupSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*GroupSlice) ReloadAll ¶
func (o *GroupSlice) 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 (GroupSlice) UpdateAll ¶
func (o GroupSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type JWTKey ¶
type JWTKey struct {
ID int `boil:"id" json:"id" toml:"id" yaml:"id"`
PublicKey []byte `boil:"public_key" json:"public_key" toml:"public_key" yaml:"public_key"`
CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
R *jwtKeyR `boil:"-" json:"-" toml:"-" yaml:"-"`
L jwtKeyL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
JWTKey is an object representing the database table.
func FindJWTKey ¶
func FindJWTKey(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*JWTKey, error)
FindJWTKey retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*JWTKey) Delete ¶
Delete deletes a single JWTKey record with an executor. Delete will match against the primary key column to find the record to delete.
func (*JWTKey) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*JWTKey) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*JWTKey) Update ¶
func (o *JWTKey) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the JWTKey. 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 (*JWTKey) Upsert ¶
func (o *JWTKey) 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 JWTKeyHook ¶
JWTKeyHook is the signature for custom JWTKey hook methods
type JWTKeySlice ¶
type JWTKeySlice []*JWTKey
JWTKeySlice is an alias for a slice of pointers to JWTKey. This should generally be used opposed to []JWTKey.
func (JWTKeySlice) DeleteAll ¶
func (o JWTKeySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*JWTKeySlice) ReloadAll ¶
func (o *JWTKeySlice) 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 (JWTKeySlice) UpdateAll ¶
func (o JWTKeySlice) 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 Migration ¶
type Migration struct {
ID string `boil:"id" json:"id" toml:"id" yaml:"id"`
AppliedAt null.Time `boil:"applied_at" json:"applied_at,omitempty" toml:"applied_at" yaml:"applied_at,omitempty"`
R *migrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
L migrationL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Migration is an object representing the database table.
func FindMigration ¶
func FindMigration(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Migration, error)
FindMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Migration) Delete ¶
Delete deletes a single Migration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Migration) Insert ¶
func (o *Migration) 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 (*Migration) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Migration) Update ¶
func (o *Migration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Migration. 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 (*Migration) Upsert ¶
func (o *Migration) 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 MigrationHook ¶
MigrationHook is the signature for custom Migration hook methods
type MigrationSlice ¶
type MigrationSlice []*Migration
MigrationSlice is an alias for a slice of pointers to Migration. This should generally be used opposed to []Migration.
func (MigrationSlice) DeleteAll ¶
func (o MigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*MigrationSlice) ReloadAll ¶
func (o *MigrationSlice) 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 (MigrationSlice) UpdateAll ¶
func (o MigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Password ¶
type Password struct {
UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_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"`
Salt []byte `boil:"salt" json:"salt" toml:"salt" yaml:"salt"`
Hash []byte `boil:"hash" json:"hash" toml:"hash" yaml:"hash"`
R *passwordR `boil:"-" json:"-" toml:"-" yaml:"-"`
L passwordL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
Password is an object representing the database table.
func FindPassword ¶
func FindPassword(ctx context.Context, exec boil.ContextExecutor, userID int, selectCols ...string) (*Password, error)
FindPassword retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Password) Delete ¶
Delete deletes a single Password record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Password) Insert ¶
func (o *Password) 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 (*Password) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Password) SetUser ¶
func (o *Password) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the password to the related item. Sets o.R.User to related. Adds o to related.R.Password.
func (*Password) Update ¶
func (o *Password) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Password. 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 (*Password) Upsert ¶
func (o *Password) 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 PasswordHook ¶
PasswordHook is the signature for custom Password hook methods
type PasswordSlice ¶
type PasswordSlice []*Password
PasswordSlice is an alias for a slice of pointers to Password. This should generally be used opposed to []Password.
func (PasswordSlice) DeleteAll ¶
func (o PasswordSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*PasswordSlice) ReloadAll ¶
func (o *PasswordSlice) 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 (PasswordSlice) UpdateAll ¶
func (o PasswordSlice) 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 int `boil:"id" json:"id" toml:"id" yaml:"id"`
Email string `boil:"email" json:"email" toml:"email" yaml:"email"`
Name string `boil:"name" json:"name" toml:"name" yaml:"name"`
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 *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) AddGroups ¶
func (o *User) AddGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
AddGroups adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Groups. Sets related.R.Users 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) RemoveGroups ¶
func (o *User) RemoveGroups(ctx context.Context, exec boil.ContextExecutor, related ...*Group) error
RemoveGroups relationships from objects passed in. Removes related items from R.Groups (uses pointer comparison, removal does not keep order) Sets related.R.Users.
func (*User) SetGroups ¶
func (o *User) SetGroups(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Group) error
SetGroups 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.Users's Groups accordingly. Replaces o.R.Groups with related. Sets related.R.Users's Groups accordingly.
func (*User) SetPassword ¶
func (o *User) SetPassword(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Password) error
SetPassword of the user to the related item. Sets o.R.Password to related. Adds o to related.R.User.
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.