Documentation
¶
Index ¶
- Variables
- func AuthenticationCodeExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func AuthenticationCodes(mods ...qm.QueryMod) authenticationCodeQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func PassportExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Passports(mods ...qm.QueryMod) passportQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type AuthenticationCode
- func (o *AuthenticationCode) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *AuthenticationCode) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *AuthenticationCode) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *AuthenticationCode) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *AuthenticationCode) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *AuthenticationCode) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *AuthenticationCode) User(mods ...qm.QueryMod) userQuery
- type AuthenticationCodeSlice
- func (o AuthenticationCodeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *AuthenticationCodeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o AuthenticationCodeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type M
- type Passport
- func (o *Passport) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Passport) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Passport) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Passport) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
- func (o *Passport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Passport) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *Passport) User(mods ...qm.QueryMod) userQuery
- type PassportSlice
- type User
- func (o *User) AddAuthenticationCodes(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *User) AuthenticationCodes(mods ...qm.QueryMod) authenticationCodeQuery
- 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) Passport(mods ...qm.QueryMod) passportQuery
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) SetPassport(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Passport) 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 UserSlice
Constants ¶
This section is empty.
Variables ¶
var AuthenticationCodeColumns = struct { ID string CreatedAt string UserID string Code string Expired string }{ ID: "id", CreatedAt: "created_at", UserID: "user_id", Code: "code", Expired: "expired", }
var AuthenticationCodeRels = struct { User string }{ User: "User", }
AuthenticationCodeRels is where relationship names are stored.
var AuthenticationCodeTableColumns = struct { ID string CreatedAt string UserID string Code string Expired string }{ ID: "authentication_codes.id", CreatedAt: "authentication_codes.created_at", UserID: "authentication_codes.user_id", Code: "authentication_codes.code", Expired: "authentication_codes.expired", }
var AuthenticationCodeWhere = struct { ID whereHelperint64 CreatedAt whereHelpertime_Time UserID whereHelperint64 Code whereHelperstring Expired whereHelperbool }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UserID: whereHelperint64{/* contains filtered or unexported fields */}, Code: whereHelperstring{/* contains filtered or unexported fields */}, Expired: whereHelperbool{/* contains filtered or unexported fields */}, }
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 PassportColumns = struct { ID string Series string Number string FirstName string MiddleName string LastName string IssuedBy string IssuedAt string Address string Birthplace string Birthdate string }{ ID: "id", Series: "series", Number: "number", FirstName: "first_name", MiddleName: "middle_name", LastName: "last_name", IssuedBy: "issued_by", IssuedAt: "issued_at", Address: "address", Birthplace: "birthplace", Birthdate: "birthdate", }
var PassportRels = struct { User string }{ User: "User", }
PassportRels is where relationship names are stored.
var PassportTableColumns = struct { ID string Series string Number string FirstName string MiddleName string LastName string IssuedBy string IssuedAt string Address string Birthplace string Birthdate string }{ ID: "passports.id", Series: "passports.series", Number: "passports.number", FirstName: "passports.first_name", MiddleName: "passports.middle_name", LastName: "passports.last_name", IssuedBy: "passports.issued_by", IssuedAt: "passports.issued_at", Address: "passports.address", Birthplace: "passports.birthplace", Birthdate: "passports.birthdate", }
var PassportWhere = struct { ID whereHelperint64 Series whereHelperstring Number whereHelperstring FirstName whereHelperstring MiddleName whereHelperstring LastName whereHelperstring IssuedBy whereHelperstring IssuedAt whereHelpertime_Time Address whereHelperstring Birthplace whereHelperstring Birthdate whereHelpertime_Time }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, Series: whereHelperstring{/* contains filtered or unexported fields */}, Number: whereHelperstring{/* contains filtered or unexported fields */}, FirstName: whereHelperstring{/* contains filtered or unexported fields */}, MiddleName: whereHelperstring{/* contains filtered or unexported fields */}, LastName: whereHelperstring{/* contains filtered or unexported fields */}, IssuedBy: whereHelperstring{/* contains filtered or unexported fields */}, IssuedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Address: whereHelperstring{/* contains filtered or unexported fields */}, Birthplace: whereHelperstring{/* contains filtered or unexported fields */}, Birthdate: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { AuthenticationCodes string Passports string Users string }{ AuthenticationCodes: "authentication_codes", Passports: "passports", Users: "users", }
var UserColumns = struct { ID string CreatedAt string Email string Password string PassportID string HashSalt string }{ ID: "id", CreatedAt: "created_at", Email: "email", Password: "password", PassportID: "passport_id", HashSalt: "hash_salt", }
var UserRels = struct { Passport string AuthenticationCodes string }{ Passport: "Passport", AuthenticationCodes: "AuthenticationCodes", }
UserRels is where relationship names are stored.
var UserTableColumns = struct { ID string CreatedAt string Email string Password string PassportID string HashSalt string }{ ID: "users.id", CreatedAt: "users.created_at", Email: "users.email", Password: "users.password", PassportID: "users.passport_id", HashSalt: "users.hash_salt", }
var UserWhere = struct { ID whereHelperint64 CreatedAt whereHelpertime_Time Email whereHelperstring Password whereHelperstring PassportID whereHelperint64 HashSalt whereHelperstring }{ ID: whereHelperint64{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Email: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelperstring{/* contains filtered or unexported fields */}, PassportID: whereHelperint64{/* contains filtered or unexported fields */}, HashSalt: whereHelperstring{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func AuthenticationCodeExists ¶
func AuthenticationCodeExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)
AuthenticationCodeExists checks if the AuthenticationCode row exists.
func AuthenticationCodes ¶
AuthenticationCodes retrieves all the records using an executor.
func PassportExists ¶
PassportExists checks if the Passport row exists.
func UserExists ¶
UserExists checks if the User row exists.
Types ¶
type AuthenticationCode ¶
type AuthenticationCode struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UserID int64 `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` Code string `boil:"code" json:"code" toml:"code" yaml:"code"` Expired bool `boil:"expired" json:"expired" toml:"expired" yaml:"expired"` R *authenticationCodeR `boil:"-" json:"-" toml:"-" yaml:"-"` L authenticationCodeL `boil:"-" json:"-" toml:"-" yaml:"-"` }
AuthenticationCode is an object representing the database table.
func FindAuthenticationCode ¶
func FindAuthenticationCode(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*AuthenticationCode, error)
FindAuthenticationCode retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*AuthenticationCode) Delete ¶
func (o *AuthenticationCode) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single AuthenticationCode record with an executor. Delete will match against the primary key column to find the record to delete.
func (*AuthenticationCode) Insert ¶
func (o *AuthenticationCode) 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 (*AuthenticationCode) Reload ¶
func (o *AuthenticationCode) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*AuthenticationCode) SetUser ¶
func (o *AuthenticationCode) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the authenticationCode to the related item. Sets o.R.User to related. Adds o to related.R.AuthenticationCodes.
func (*AuthenticationCode) Update ¶
func (o *AuthenticationCode) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the AuthenticationCode. 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 (*AuthenticationCode) Upsert ¶
func (o *AuthenticationCode) 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.
func (*AuthenticationCode) User ¶
func (o *AuthenticationCode) User(mods ...qm.QueryMod) userQuery
User pointed to by the foreign key.
type AuthenticationCodeSlice ¶
type AuthenticationCodeSlice []*AuthenticationCode
AuthenticationCodeSlice is an alias for a slice of pointers to AuthenticationCode. This should almost always be used instead of []AuthenticationCode.
func (AuthenticationCodeSlice) DeleteAll ¶
func (o AuthenticationCodeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*AuthenticationCodeSlice) ReloadAll ¶
func (o *AuthenticationCodeSlice) 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 (AuthenticationCodeSlice) UpdateAll ¶
func (o AuthenticationCodeSlice) 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 Passport ¶
type Passport struct { ID int64 `boil:"id" json:"id" toml:"id" yaml:"id"` Series string `boil:"series" json:"series" toml:"series" yaml:"series"` Number string `boil:"number" json:"number" toml:"number" yaml:"number"` FirstName string `boil:"first_name" json:"first_name" toml:"first_name" yaml:"first_name"` MiddleName string `boil:"middle_name" json:"middle_name" toml:"middle_name" yaml:"middle_name"` LastName string `boil:"last_name" json:"last_name" toml:"last_name" yaml:"last_name"` IssuedBy string `boil:"issued_by" json:"issued_by" toml:"issued_by" yaml:"issued_by"` IssuedAt time.Time `boil:"issued_at" json:"issued_at" toml:"issued_at" yaml:"issued_at"` Address string `boil:"address" json:"address" toml:"address" yaml:"address"` Birthplace string `boil:"birthplace" json:"birthplace" toml:"birthplace" yaml:"birthplace"` Birthdate time.Time `boil:"birthdate" json:"birthdate" toml:"birthdate" yaml:"birthdate"` R *passportR `boil:"-" json:"-" toml:"-" yaml:"-"` L passportL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Passport is an object representing the database table.
func FindPassport ¶
func FindPassport(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Passport, error)
FindPassport retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Passport) Delete ¶
Delete deletes a single Passport record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Passport) Insert ¶
func (o *Passport) 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 (*Passport) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Passport) SetUser ¶
func (o *Passport) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error
SetUser of the passport to the related item. Sets o.R.User to related. Adds o to related.R.Passport.
func (*Passport) Update ¶
func (o *Passport) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Passport. 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 (*Passport) Upsert ¶
func (o *Passport) 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 PassportSlice ¶
type PassportSlice []*Passport
PassportSlice is an alias for a slice of pointers to Passport. This should almost always be used instead of []Passport.
func (PassportSlice) DeleteAll ¶
func (o PassportSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*PassportSlice) ReloadAll ¶
func (o *PassportSlice) 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 (PassportSlice) UpdateAll ¶
func (o PassportSlice) 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"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` Email string `boil:"email" json:"email" toml:"email" yaml:"email"` Password string `boil:"password" json:"password" toml:"password" yaml:"password"` PassportID int64 `boil:"passport_id" json:"passport_id" toml:"passport_id" yaml:"passport_id"` HashSalt string `boil:"hash_salt" json:"hash_salt" toml:"hash_salt" yaml:"hash_salt"` 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) AddAuthenticationCodes ¶
func (o *User) AddAuthenticationCodes(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*AuthenticationCode) error
AddAuthenticationCodes adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.AuthenticationCodes. Sets related.R.User appropriately.
func (*User) AuthenticationCodes ¶
AuthenticationCodes retrieves all the authentication_code's AuthenticationCodes with an executor.
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) SetPassport ¶
func (o *User) SetPassport(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Passport) error
SetPassport of the user to the related item. Sets o.R.Passport 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 almost always be used instead of []User.