Documentation
¶
Index ¶
- Variables
- func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
- func SchemaMigrationExistsG(ctx context.Context, version int64) (bool, error)
- func SchemaMigrations(mods ...qm.QueryMod) schemaMigrationQuery
- func UserExists(ctx context.Context, exec boil.ContextExecutor, userID int) (bool, error)
- func UserExistsG(ctx context.Context, userID int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- type M
- type SchemaMigration
- func (o *SchemaMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *SchemaMigration) DeleteG(ctx context.Context) (int64, error)
- func (o *SchemaMigration) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *SchemaMigration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *SchemaMigration) InsertG(ctx context.Context, columns boil.Columns) error
- func (o *SchemaMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *SchemaMigration) ReloadG(ctx context.Context) error
- func (o *SchemaMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *SchemaMigration) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)
- func (o *SchemaMigration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *SchemaMigration) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, ...) error
- type SchemaMigrationHook
- type SchemaMigrationSlice
- func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o SchemaMigrationSlice) DeleteAllG(ctx context.Context) (int64, error)
- func (o *SchemaMigrationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o *SchemaMigrationSlice) ReloadAllG(ctx context.Context) error
- func (o SchemaMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- func (o SchemaMigrationSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)
- type User
- func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *User) DeleteG(ctx context.Context) (int64, error)
- func (o *User) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *User) InsertG(ctx context.Context, columns boil.Columns) error
- func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *User) ReloadG(ctx context.Context) error
- func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *User) UpdateG(ctx context.Context, columns boil.Columns) (int64, error)
- func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- func (o *User) UpsertG(ctx context.Context, updateOnConflict bool, conflictColumns []string, ...) error
- type UserHook
- type UserSlice
- func (o UserSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o UserSlice) DeleteAllG(ctx context.Context) (int64, error)
- func (o *UserSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o *UserSlice) ReloadAllG(ctx context.Context) error
- func (o UserSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- func (o UserSlice) UpdateAllG(ctx context.Context, cols M) (int64, error)
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 SchemaMigrationColumns = struct { Version string Dirty string }{ Version: "version", Dirty: "dirty", }
var SchemaMigrationRels = struct {
}{}
SchemaMigrationRels is where relationship names are stored.
var SchemaMigrationTableColumns = struct { Version string Dirty string }{ Version: "schema_migrations.version", Dirty: "schema_migrations.dirty", }
var SchemaMigrationWhere = struct { Version whereHelperint64 Dirty whereHelperbool }{ Version: whereHelperint64{/* contains filtered or unexported fields */}, Dirty: whereHelperbool{/* contains filtered or unexported fields */}, }
var TableNames = struct { SchemaMigrations string Users string }{ SchemaMigrations: "schema_migrations", Users: "users", }
var UserColumns = struct { UserID string Username string Password string Email string }{ UserID: "user_id", Username: "username", Password: "password", Email: "email", }
var UserRels = struct {
}{}
UserRels is where relationship names are stored.
var UserTableColumns = struct { UserID string Username string Password string Email string }{ UserID: "users.user_id", Username: "users.username", Password: "users.password", Email: "users.email", }
var UserWhere = struct { UserID whereHelperint Username whereHelperstring Password whereHelperstring Email whereHelperstring }{ UserID: whereHelperint{/* contains filtered or unexported fields */}, Username: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelperstring{/* contains filtered or unexported fields */}, Email: whereHelperstring{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func AddSchemaMigrationHook ¶
func AddSchemaMigrationHook(hookPoint boil.HookPoint, schemaMigrationHook SchemaMigrationHook)
AddSchemaMigrationHook registers your hook function for all future operations.
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func SchemaMigrationExists ¶
func SchemaMigrationExists(ctx context.Context, exec boil.ContextExecutor, version int64) (bool, error)
SchemaMigrationExists checks if the SchemaMigration row exists.
func SchemaMigrationExistsG ¶
SchemaMigrationExistsG checks if the SchemaMigration row exists.
func SchemaMigrations ¶
SchemaMigrations retrieves all the records using an executor.
func UserExists ¶
UserExists checks if the User row exists.
func UserExistsG ¶
UserExistsG checks if the User row exists.
Types ¶
type M ¶
type M map[string]interface{}
M type is for providing columns and column values to UpdateAll.
type SchemaMigration ¶
type SchemaMigration struct {
Version int64 `boil:"version" json:"version" toml:"version" yaml:"version"`
Dirty bool `boil:"dirty" json:"dirty" toml:"dirty" yaml:"dirty"`
R *schemaMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"`
L schemaMigrationL `boil:"-" json:"-" toml:"-" yaml:"-"`
}
SchemaMigration is an object representing the database table.
func FindSchemaMigration ¶
func FindSchemaMigration(ctx context.Context, exec boil.ContextExecutor, version int64, selectCols ...string) (*SchemaMigration, error)
FindSchemaMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func FindSchemaMigrationG ¶
func FindSchemaMigrationG(ctx context.Context, version int64, selectCols ...string) (*SchemaMigration, error)
FindSchemaMigrationG retrieves a single record by ID.
func (*SchemaMigration) Delete ¶
func (o *SchemaMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single SchemaMigration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*SchemaMigration) DeleteG ¶
func (o *SchemaMigration) DeleteG(ctx context.Context) (int64, error)
DeleteG deletes a single SchemaMigration record. DeleteG will match against the primary key column to find the record to delete.
func (*SchemaMigration) Exists ¶
func (o *SchemaMigration) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the SchemaMigration row exists.
func (*SchemaMigration) Insert ¶
func (o *SchemaMigration) 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 (*SchemaMigration) InsertG ¶
InsertG a single record. See Insert for whitelist behavior description.
func (*SchemaMigration) Reload ¶
func (o *SchemaMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*SchemaMigration) ReloadG ¶
func (o *SchemaMigration) ReloadG(ctx context.Context) error
ReloadG refetches the object from the database using the primary keys.
func (*SchemaMigration) Update ¶
func (o *SchemaMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the SchemaMigration. 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 (*SchemaMigration) UpdateG ¶
UpdateG a single SchemaMigration record using the global executor. See Update for more documentation.
func (*SchemaMigration) Upsert ¶
func (o *SchemaMigration) 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 SchemaMigrationHook ¶
type SchemaMigrationHook func(context.Context, boil.ContextExecutor, *SchemaMigration) error
SchemaMigrationHook is the signature for custom SchemaMigration hook methods
type SchemaMigrationSlice ¶
type SchemaMigrationSlice []*SchemaMigration
SchemaMigrationSlice is an alias for a slice of pointers to SchemaMigration. This should almost always be used instead of []SchemaMigration.
func (SchemaMigrationSlice) DeleteAll ¶
func (o SchemaMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (SchemaMigrationSlice) DeleteAllG ¶
func (o SchemaMigrationSlice) DeleteAllG(ctx context.Context) (int64, error)
DeleteAllG deletes all rows in the slice.
func (*SchemaMigrationSlice) ReloadAll ¶
func (o *SchemaMigrationSlice) 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 (*SchemaMigrationSlice) ReloadAllG ¶
func (o *SchemaMigrationSlice) ReloadAllG(ctx context.Context) error
ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (SchemaMigrationSlice) UpdateAll ¶
func (o SchemaMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
func (SchemaMigrationSlice) UpdateAllG ¶
UpdateAllG updates all rows with the specified column values.
type User ¶
type User struct {
UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
Username string `boil:"username" json:"username" toml:"username" yaml:"username"`
Password string `boil:"password" json:"password" toml:"password" yaml:"password"`
Email string `boil:"email" json:"email" toml:"email" yaml:"email"`
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, userID 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) DeleteG ¶
DeleteG deletes a single User record. DeleteG 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) UpdateG ¶
UpdateG a single User record using the global executor. See Update for more documentation.
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) DeleteAllG ¶
DeleteAllG deletes all rows in the slice.
func (*UserSlice) ReloadAll ¶
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.
func (*UserSlice) ReloadAllG ¶
ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.