Documentation ¶
Index ¶
- Variables
- func AddInstanceHook(hookPoint boil.HookPoint, instanceHook InstanceHook)
- func AddProfileHook(hookPoint boil.HookPoint, profileHook ProfileHook)
- func AddTokenHook(hookPoint boil.HookPoint, tokenHook TokenHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func InstanceExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Instances(mods ...qm.QueryMod) instanceQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func ProfileExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Profiles(mods ...qm.QueryMod) profileQuery
- func TokenExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Tokens(mods ...qm.QueryMod) tokenQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type Instance
- func (o *Instance) AddProfiles(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Instance) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *Instance) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Instance) Profiles(mods ...qm.QueryMod) profileQuery
- func (o *Instance) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Instance) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Instance) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type InstanceHook
- type InstanceSlice
- func (o InstanceSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *InstanceSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o InstanceSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type M
- type Profile
- func (o *Profile) AddTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Token) error
- func (o *Profile) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *Profile) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Profile) Instance(mods ...qm.QueryMod) instanceQuery
- func (o *Profile) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Profile) SetInstance(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Instance) error
- func (o *Profile) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Profile) Tokens(mods ...qm.QueryMod) tokenQuery
- func (o *Profile) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Profile) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Profile) User(mods ...qm.QueryMod) userQuery
- type ProfileHook
- type ProfileSlice
- func (o ProfileSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *ProfileSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o ProfileSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type Token
- func (o *Token) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Token) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Token) Profile(mods ...qm.QueryMod) profileQuery
- func (o *Token) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Token) SetProfile(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Profile) error
- func (o *Token) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Token) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Token) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Token) User(mods ...qm.QueryMod) userQuery
- type TokenHook
- type TokenSlice
- type User
- func (o *User) AddProfiles(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AddTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Token) error
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) Profiles(mods ...qm.QueryMod) profileQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) Tokens(mods ...qm.QueryMod) tokenQuery
- 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("dbmodels: 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 InstanceColumns = struct { ID string Name string URL string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", Name: "name", URL: "url", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var InstanceRels = struct { Profiles string }{ Profiles: "Profiles", }
InstanceRels is where relationship names are stored.
var InstanceTableColumns = struct { ID string Name string URL string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "instances.id", Name: "instances.name", URL: "instances.url", CreatedAt: "instances.created_at", UpdatedAt: "instances.updated_at", DeletedAt: "instances.deleted_at", }
var InstanceWhere = struct { ID whereHelperstring Name whereHelperstring URL whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, URL: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var ProfileColumns = struct { ID string UserID string InstanceID string Role string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", UserID: "user_id", InstanceID: "instance_id", Role: "role", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var ProfileRels = struct { Instance string User string Tokens string }{ Instance: "Instance", User: "User", Tokens: "Tokens", }
ProfileRels is where relationship names are stored.
var ProfileTableColumns = struct { ID string UserID string InstanceID string Role string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "profiles.id", UserID: "profiles.user_id", InstanceID: "profiles.instance_id", Role: "profiles.role", CreatedAt: "profiles.created_at", UpdatedAt: "profiles.updated_at", DeletedAt: "profiles.deleted_at", }
var ProfileWhere = struct { ID whereHelperstring UserID whereHelperstring InstanceID whereHelperstring Role whereHelpernull_String CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, InstanceID: whereHelperstring{/* contains filtered or unexported fields */}, Role: whereHelpernull_String{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Instances string Profiles string Tokens string Users string }{ Instances: "instances", Profiles: "profiles", Tokens: "tokens", Users: "users", }
var TokenColumns = struct { ID string UserID string ProfileID string Token string CreatedAt string ExpiresAt string }{ ID: "id", UserID: "user_id", ProfileID: "profile_id", Token: "token", CreatedAt: "created_at", ExpiresAt: "expires_at", }
var TokenRels = struct { Profile string User string }{ Profile: "Profile", User: "User", }
TokenRels is where relationship names are stored.
var TokenTableColumns = struct { ID string UserID string ProfileID string Token string CreatedAt string ExpiresAt string }{ ID: "tokens.id", UserID: "tokens.user_id", ProfileID: "tokens.profile_id", Token: "tokens.token", CreatedAt: "tokens.created_at", ExpiresAt: "tokens.expires_at", }
var TokenWhere = struct { ID whereHelperint64 UserID whereHelperstring ProfileID whereHelperstring Token whereHelperstring CreatedAt whereHelpertime_Time ExpiresAt whereHelpertime_Time }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, ProfileID: whereHelperstring{/* contains filtered or unexported fields */}, Token: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, ExpiresAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var UserColumns = struct { ID string Name string Email string Password string ActivatedAt string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "id", Name: "name", Email: "email", Password: "password", ActivatedAt: "activated_at", CreatedAt: "created_at", UpdatedAt: "updated_at", DeletedAt: "deleted_at", }
var UserRels = struct { Profiles string Tokens string }{ Profiles: "Profiles", Tokens: "Tokens", }
UserRels is where relationship names are stored.
var UserTableColumns = struct { ID string Name string Email string Password string ActivatedAt string CreatedAt string UpdatedAt string DeletedAt string }{ ID: "users.id", Name: "users.name", Email: "users.email", Password: "users.password", ActivatedAt: "users.activated_at", CreatedAt: "users.created_at", UpdatedAt: "users.updated_at", DeletedAt: "users.deleted_at", }
var UserWhere = struct { ID whereHelperstring Name whereHelpernull_String Email whereHelperstring Password whereHelper__byte ActivatedAt whereHelpernull_Time CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time DeletedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Name: whereHelpernull_String{/* contains filtered or unexported fields */}, Email: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelper__byte{/* contains filtered or unexported fields */}, ActivatedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, DeletedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
Functions ¶
func AddInstanceHook ¶
func AddInstanceHook(hookPoint boil.HookPoint, instanceHook InstanceHook)
AddInstanceHook registers your hook function for all future operations.
func AddProfileHook ¶
func AddProfileHook(hookPoint boil.HookPoint, profileHook ProfileHook)
AddProfileHook registers your hook function for all future operations.
func AddTokenHook ¶
AddTokenHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func InstanceExists ¶
InstanceExists checks if the Instance row exists.
func ProfileExists ¶
ProfileExists checks if the Profile row exists.
func TokenExists ¶
TokenExists checks if the Token row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type Instance ¶
type Instance struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` URL string `boil:"url" json:"url" toml:"url" yaml:"url"` 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"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *instanceR `boil:"-" json:"-" toml:"-" yaml:"-"` L instanceL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Instance is an object representing the database table.
func FindInstance ¶
func FindInstance(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Instance, error)
FindInstance retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Instance) AddProfiles ¶
func (o *Instance) AddProfiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Profile) error
AddProfiles adds the given related objects to the existing relationships of the instance, optionally inserting them as new records. Appends related to o.R.Profiles. Sets related.R.Instance appropriately.
func (*Instance) Delete ¶
func (o *Instance) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
Delete deletes a single Instance record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Instance) Insert ¶
func (o *Instance) 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 (*Instance) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Instance) Update ¶
func (o *Instance) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Instance. 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 (*Instance) Upsert ¶
func (o *Instance) 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 InstanceHook ¶
InstanceHook is the signature for custom Instance hook methods
type InstanceSlice ¶
type InstanceSlice []*Instance
InstanceSlice is an alias for a slice of pointers to Instance. This should almost always be used instead of []Instance.
func (InstanceSlice) DeleteAll ¶
func (o InstanceSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*InstanceSlice) ReloadAll ¶
func (o *InstanceSlice) 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 (InstanceSlice) UpdateAll ¶
func (o InstanceSlice) 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 Profile ¶
type Profile struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` InstanceID string `boil:"instance_id" json:"instance_id" toml:"instance_id" yaml:"instance_id"` Role null.String `boil:"role" json:"role,omitempty" toml:"role" yaml:"role,omitempty"` 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"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"` R *profileR `boil:"-" json:"-" toml:"-" yaml:"-"` L profileL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Profile is an object representing the database table.
func FindProfile ¶
func FindProfile(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Profile, error)
FindProfile retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Profile) AddTokens ¶
func (o *Profile) AddTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Token) error
AddTokens adds the given related objects to the existing relationships of the profile, optionally inserting them as new records. Appends related to o.R.Tokens. Sets related.R.Profile appropriately.
func (*Profile) Delete ¶
func (o *Profile) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
Delete deletes a single Profile record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Profile) Insert ¶
func (o *Profile) 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 (*Profile) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Profile) SetInstance ¶
func (o *Profile) SetInstance(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Instance) error
SetInstance of the profile to the related item. Sets o.R.Instance to related. Adds o to related.R.Profiles.
func (*Profile) SetUser ¶
func (o *Profile) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the profile to the related item. Sets o.R.User to related. Adds o to related.R.Profiles.
func (*Profile) Update ¶
func (o *Profile) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Profile. 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 (*Profile) Upsert ¶
func (o *Profile) 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 ProfileHook ¶
ProfileHook is the signature for custom Profile hook methods
type ProfileSlice ¶
type ProfileSlice []*Profile
ProfileSlice is an alias for a slice of pointers to Profile. This should almost always be used instead of []Profile.
func (ProfileSlice) DeleteAll ¶
func (o ProfileSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ProfileSlice) ReloadAll ¶
func (o *ProfileSlice) 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 (ProfileSlice) UpdateAll ¶
func (o ProfileSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type Token ¶
type Token struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` ProfileID string `boil:"profile_id" json:"profile_id" toml:"profile_id" yaml:"profile_id"` Token string `boil:"token" json:"token" toml:"token" yaml:"token"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` ExpiresAt time.Time `boil:"expires_at" json:"expires_at" toml:"expires_at" yaml:"expires_at"` R *tokenR `boil:"-" json:"-" toml:"-" yaml:"-"` L tokenL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Token is an object representing the database table.
func FindToken ¶
func FindToken(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Token, error)
FindToken retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Token) Delete ¶
Delete deletes a single Token record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Token) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Token) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Token) SetProfile ¶
func (o *Token) SetProfile(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Profile) error
SetProfile of the token to the related item. Sets o.R.Profile to related. Adds o to related.R.Tokens.
func (*Token) SetUser ¶
func (o *Token) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the token to the related item. Sets o.R.User to related. Adds o to related.R.Tokens.
func (*Token) Update ¶
func (o *Token) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Token. 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 (*Token) Upsert ¶
func (o *Token) 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 TokenSlice ¶
type TokenSlice []*Token
TokenSlice is an alias for a slice of pointers to Token. This should almost always be used instead of []Token.
func (TokenSlice) DeleteAll ¶
func (o TokenSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*TokenSlice) ReloadAll ¶
func (o *TokenSlice) 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 (TokenSlice) UpdateAll ¶
func (o TokenSlice) 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"` Name null.String `boil:"name" json:"name,omitempty" toml:"name" yaml:"name,omitempty"` Email string `boil:"email" json:"email" toml:"email" yaml:"email"` Password []byte `boil:"password" json:"password" toml:"password" yaml:"password"` ActivatedAt null.Time `boil:"activated_at" json:"activated_at,omitempty" toml:"activated_at" yaml:"activated_at,omitempty"` 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"` DeletedAt null.Time `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,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) AddProfiles ¶
func (o *User) AddProfiles(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Profile) error
AddProfiles adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Profiles. Sets related.R.User appropriately.
func (*User) AddTokens ¶
func (o *User) AddTokens(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Token) error
AddTokens adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.Tokens. Sets related.R.User appropriately.
func (*User) Delete ¶
func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (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) 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 almost always be used instead of []User.
func (UserSlice) DeleteAll ¶
func (o UserSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor, hardDelete bool) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.