Documentation ¶
Index ¶
- Variables
- func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)
- func AddUsersPermissionHook(hookPoint boil.HookPoint, usersPermissionHook UsersPermissionHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func Users(mods ...qm.QueryMod) userQuery
- func UsersPermissionExists(ctx context.Context, exec boil.ContextExecutor, userID int, postID int) (bool, error)
- func UsersPermissions(mods ...qm.QueryMod) usersPermissionQuery
- type M
- type User
- 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) Reload(ctx context.Context, exec boil.ContextExecutor) 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
- type UsersPermission
- func (o *UsersPermission) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *UsersPermission) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *UsersPermission) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *UsersPermission) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *UsersPermission) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type UsersPermissionHook
- type UsersPermissionSlice
- func (o UsersPermissionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *UsersPermissionSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o UsersPermissionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
Constants ¶
This section is empty.
Variables ¶
var ErrSyncFail = errors.New("sqlboilergen: 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 TableNames = struct { Users string UsersPermissions string }{ Users: "users", UsersPermissions: "users_permissions", }
var UserColumns = struct { ID string Age string Name string }{ ID: "id", Age: "age", Name: "name", }
var UserRels = struct {
}{}
UserRels is where relationship names are stored.
var UserTableColumns = struct { ID string Age string Name string }{ ID: "users.id", Age: "users.age", Name: "users.name", }
var UserWhere = struct { ID whereHelperint Age whereHelperint Name whereHelperstring }{ ID: whereHelperint{/* contains filtered or unexported fields */}, Age: whereHelperint{/* contains filtered or unexported fields */}, Name: whereHelperstring{/* contains filtered or unexported fields */}, }
var UsersPermissionColumns = struct { UserID string PostID string }{ UserID: "user_id", PostID: "post_id", }
var UsersPermissionRels = struct {
}{}
UsersPermissionRels is where relationship names are stored.
var UsersPermissionTableColumns = struct { UserID string PostID string }{ UserID: "users_permissions.user_id", PostID: "users_permissions.post_id", }
var UsersPermissionWhere = struct { UserID whereHelperint PostID whereHelperint }{ UserID: whereHelperint{/* contains filtered or unexported fields */}, PostID: whereHelperint{/* contains filtered or unexported fields */}, }
var ViewNames = struct {
}{}
Functions ¶
func AddUserHook ¶
AddUserHook registers your hook function for all future operations.
func AddUsersPermissionHook ¶
func AddUsersPermissionHook(hookPoint boil.HookPoint, usersPermissionHook UsersPermissionHook)
AddUsersPermissionHook registers your hook function for all future operations.
func UserExists ¶
UserExists checks if the User row exists.
func UsersPermissionExists ¶
func UsersPermissionExists(ctx context.Context, exec boil.ContextExecutor, userID int, postID int) (bool, error)
UsersPermissionExists checks if the UsersPermission row exists.
func UsersPermissions ¶
UsersPermissions 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 User ¶
type User struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` Age int `boil:"age" json:"age" toml:"age" yaml:"age"` Name string `boil:"name" json:"name" toml:"name" yaml:"name"` 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) 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) 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.
type UsersPermission ¶
type UsersPermission struct { UserID int `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` PostID int `boil:"post_id" json:"post_id" toml:"post_id" yaml:"post_id"` R *usersPermissionR `boil:"-" json:"-" toml:"-" yaml:"-"` L usersPermissionL `boil:"-" json:"-" toml:"-" yaml:"-"` }
UsersPermission is an object representing the database table.
func FindUsersPermission ¶
func FindUsersPermission(ctx context.Context, exec boil.ContextExecutor, userID int, postID int, selectCols ...string) (*UsersPermission, error)
FindUsersPermission retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*UsersPermission) Delete ¶
func (o *UsersPermission) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single UsersPermission record with an executor. Delete will match against the primary key column to find the record to delete.
func (*UsersPermission) Insert ¶
func (o *UsersPermission) 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 (*UsersPermission) Reload ¶
func (o *UsersPermission) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*UsersPermission) Update ¶
func (o *UsersPermission) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the UsersPermission. 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 (*UsersPermission) Upsert ¶
func (o *UsersPermission) 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 UsersPermissionHook ¶
type UsersPermissionHook func(context.Context, boil.ContextExecutor, *UsersPermission) error
UsersPermissionHook is the signature for custom UsersPermission hook methods
type UsersPermissionSlice ¶
type UsersPermissionSlice []*UsersPermission
UsersPermissionSlice is an alias for a slice of pointers to UsersPermission. This should almost always be used instead of []UsersPermission.
func (UsersPermissionSlice) DeleteAll ¶
func (o UsersPermissionSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*UsersPermissionSlice) ReloadAll ¶
func (o *UsersPermissionSlice) 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 (UsersPermissionSlice) UpdateAll ¶
func (o UsersPermissionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.