models

package
v0.0.0-...-ec3f0cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Functions

func AddBoilerplateRoleHook

func AddBoilerplateRoleHook(hookPoint boil.HookPoint, boilerplateRoleHook BoilerplateRoleHook)

AddBoilerplateRoleHook registers your hook function for all future operations.

func AddBoilerplateUserHook

func AddBoilerplateUserHook(hookPoint boil.HookPoint, boilerplateUserHook BoilerplateUserHook)

AddBoilerplateUserHook registers your hook function for all future operations.

func AddLadonPolicyHook

func AddLadonPolicyHook(hookPoint boil.HookPoint, ladonPolicyHook LadonPolicyHook)

AddLadonPolicyHook registers your hook function for all future operations.

func BoilerplateRoleExists

func BoilerplateRoleExists(exec boil.Executor, id int) (bool, error)

BoilerplateRoleExists checks if the BoilerplateRole row exists.

func BoilerplateRoleExistsG

func BoilerplateRoleExistsG(id int) (bool, error)

BoilerplateRoleExistsG checks if the BoilerplateRole row exists.

func BoilerplateRoleExistsGP

func BoilerplateRoleExistsGP(id int) bool

BoilerplateRoleExistsGP checks if the BoilerplateRole row exists. Panics on error.

func BoilerplateRoleExistsP

func BoilerplateRoleExistsP(exec boil.Executor, id int) bool

BoilerplateRoleExistsP checks if the BoilerplateRole row exists. Panics on error.

func BoilerplateRoles

func BoilerplateRoles(exec boil.Executor, mods ...qm.QueryMod) boilerplateRoleQuery

BoilerplateRoles retrieves all the records using an executor.

func BoilerplateRolesG

func BoilerplateRolesG(mods ...qm.QueryMod) boilerplateRoleQuery

BoilerplateRolesG retrieves all records.

func BoilerplateUserExists

func BoilerplateUserExists(exec boil.Executor, id int) (bool, error)

BoilerplateUserExists checks if the BoilerplateUser row exists.

func BoilerplateUserExistsG

func BoilerplateUserExistsG(id int) (bool, error)

BoilerplateUserExistsG checks if the BoilerplateUser row exists.

func BoilerplateUserExistsGP

func BoilerplateUserExistsGP(id int) bool

BoilerplateUserExistsGP checks if the BoilerplateUser row exists. Panics on error.

func BoilerplateUserExistsP

func BoilerplateUserExistsP(exec boil.Executor, id int) bool

BoilerplateUserExistsP checks if the BoilerplateUser row exists. Panics on error.

func BoilerplateUsers

func BoilerplateUsers(exec boil.Executor, mods ...qm.QueryMod) boilerplateUserQuery

BoilerplateUsers retrieves all the records using an executor.

func BoilerplateUsersG

func BoilerplateUsersG(mods ...qm.QueryMod) boilerplateUserQuery

BoilerplateUsersG retrieves all records.

func LadonPolicies

func LadonPolicies(exec boil.Executor, mods ...qm.QueryMod) ladonPolicyQuery

LadonPolicies retrieves all the records using an executor.

func LadonPoliciesG

func LadonPoliciesG(mods ...qm.QueryMod) ladonPolicyQuery

LadonPoliciesG retrieves all records.

func LadonPolicyExists

func LadonPolicyExists(exec boil.Executor, id string) (bool, error)

LadonPolicyExists checks if the LadonPolicy row exists.

func LadonPolicyExistsG

func LadonPolicyExistsG(id string) (bool, error)

LadonPolicyExistsG checks if the LadonPolicy row exists.

func LadonPolicyExistsGP

func LadonPolicyExistsGP(id string) bool

LadonPolicyExistsGP checks if the LadonPolicy row exists. Panics on error.

func LadonPolicyExistsP

func LadonPolicyExistsP(exec boil.Executor, id string) bool

LadonPolicyExistsP checks if the LadonPolicy row exists. Panics on error.

func NewQuery

func NewQuery(exec boil.Executor, mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func NewQueryG

func NewQueryG(mods ...qm.QueryMod) *queries.Query

NewQueryG initializes a new Query using the passed in QueryMods

Types

type BoilerplateRole

type BoilerplateRole struct {
	ID        int       `db:"id" boil:"id" json:"id" xml:"id"`
	PolicyID  string    `db:"policy_id" boil:"policy_id" json:"policy_id" xml:"policy_id"`
	CreatedAt null.Time `db:"created_at" boil:"created_at" json:"created_at,omitempty" xml:"created_at,omitempty"`
	UpdatedAt null.Time `db:"updated_at" boil:"updated_at" json:"updated_at,omitempty" xml:"updated_at,omitempty"`

	R *boilerplateRoleR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L boilerplateRoleL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

BoilerplateRole is an object representing the database table.

func FindBoilerplateRole

func FindBoilerplateRole(exec boil.Executor, id int, selectCols ...string) (*BoilerplateRole, error)

FindBoilerplateRole retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindBoilerplateRoleG

func FindBoilerplateRoleG(id int, selectCols ...string) (*BoilerplateRole, error)

FindBoilerplateRoleG retrieves a single record by ID.

func FindBoilerplateRoleGP

func FindBoilerplateRoleGP(id int, selectCols ...string) *BoilerplateRole

FindBoilerplateRoleGP retrieves a single record by ID, and panics on error.

func FindBoilerplateRoleP

func FindBoilerplateRoleP(exec boil.Executor, id int, selectCols ...string) *BoilerplateRole

FindBoilerplateRoleP retrieves a single record by ID with an executor, and panics on error.

func (*BoilerplateRole) AddRoleBoilerplateUsers

func (o *BoilerplateRole) AddRoleBoilerplateUsers(exec boil.Executor, insert bool, related ...*BoilerplateUser) error

AddRoleBoilerplateUsers adds the given related objects to the existing relationships of the boilerplate_role, optionally inserting them as new records. Appends related to o.R.RoleBoilerplateUsers. Sets related.R.Role appropriately.

func (*BoilerplateRole) Delete

func (o *BoilerplateRole) Delete(exec boil.Executor) error

Delete deletes a single BoilerplateRole record with an executor. Delete will match against the primary key column to find the record to delete.

func (*BoilerplateRole) DeleteG

func (o *BoilerplateRole) DeleteG() error

DeleteG deletes a single BoilerplateRole record. DeleteG will match against the primary key column to find the record to delete.

func (*BoilerplateRole) DeleteGP

func (o *BoilerplateRole) DeleteGP()

DeleteGP deletes a single BoilerplateRole record. DeleteGP will match against the primary key column to find the record to delete. Panics on error.

func (*BoilerplateRole) DeleteP

func (o *BoilerplateRole) DeleteP(exec boil.Executor)

DeleteP deletes a single BoilerplateRole record with an executor. DeleteP will match against the primary key column to find the record to delete. Panics on error.

func (*BoilerplateRole) Insert

func (o *BoilerplateRole) Insert(exec boil.Executor, whitelist ...string) error

Insert a single record using an executor. Whitelist behavior: If a whitelist is provided, only those columns supplied are inserted No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns without a default value are included (i.e. name, age) - All columns with a default, but non-zero are included (i.e. health = 75)

func (*BoilerplateRole) InsertG

func (o *BoilerplateRole) InsertG(whitelist ...string) error

InsertG a single record. See Insert for whitelist behavior description.

func (*BoilerplateRole) InsertGP

func (o *BoilerplateRole) InsertGP(whitelist ...string)

InsertGP a single record, and panics on error. See Insert for whitelist behavior description.

func (*BoilerplateRole) InsertP

func (o *BoilerplateRole) InsertP(exec boil.Executor, whitelist ...string)

InsertP a single record using an executor, and panics on error. See Insert for whitelist behavior description.

func (*BoilerplateRole) Policy

func (o *BoilerplateRole) Policy(exec boil.Executor, mods ...qm.QueryMod) ladonPolicyQuery

Policy pointed to by the foreign key.

func (*BoilerplateRole) PolicyG

func (o *BoilerplateRole) PolicyG(mods ...qm.QueryMod) ladonPolicyQuery

PolicyG pointed to by the foreign key.

func (*BoilerplateRole) Reload

func (o *BoilerplateRole) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*BoilerplateRole) ReloadG

func (o *BoilerplateRole) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*BoilerplateRole) ReloadGP

func (o *BoilerplateRole) ReloadGP()

ReloadGP refetches the object from the database and panics on error.

func (*BoilerplateRole) ReloadP

func (o *BoilerplateRole) ReloadP(exec boil.Executor)

ReloadP refetches the object from the database with an executor. Panics on error.

func (*BoilerplateRole) RoleBoilerplateUsers

func (o *BoilerplateRole) RoleBoilerplateUsers(exec boil.Executor, mods ...qm.QueryMod) boilerplateUserQuery

RoleBoilerplateUsers retrieves all the boilerplate_user's boilerplate user with an executor via role_id column.

func (*BoilerplateRole) RoleBoilerplateUsersG

func (o *BoilerplateRole) RoleBoilerplateUsersG(mods ...qm.QueryMod) boilerplateUserQuery

RoleBoilerplateUsersG retrieves all the boilerplate_user's boilerplate user via role_id column.

func (*BoilerplateRole) SetPolicy

func (o *BoilerplateRole) SetPolicy(exec boil.Executor, insert bool, related *LadonPolicy) error

SetPolicy of the boilerplate_role to the related item. Sets o.R.Policy to related. Adds o to related.R.PolicyBoilerplateRoles.

func (*BoilerplateRole) Update

func (o *BoilerplateRole) Update(exec boil.Executor, whitelist ...string) error

Update uses an executor to update the BoilerplateRole. Whitelist behavior: If a whitelist is provided, only the columns given are updated. No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns are inferred to start with - All primary keys are subtracted from this set Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*BoilerplateRole) UpdateG

func (o *BoilerplateRole) UpdateG(whitelist ...string) error

UpdateG a single BoilerplateRole record. See Update for whitelist behavior description.

func (*BoilerplateRole) UpdateGP

func (o *BoilerplateRole) UpdateGP(whitelist ...string)

UpdateGP a single BoilerplateRole record. UpdateGP takes a whitelist of column names that should be updated. Panics on error. See Update for whitelist behavior description.

func (*BoilerplateRole) UpdateP

func (o *BoilerplateRole) UpdateP(exec boil.Executor, whitelist ...string)

UpdateP uses an executor to update the BoilerplateRole, and panics on error. See Update for whitelist behavior description.

func (*BoilerplateRole) Upsert

func (o *BoilerplateRole) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict.

func (*BoilerplateRole) UpsertG

func (o *BoilerplateRole) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*BoilerplateRole) UpsertGP

func (o *BoilerplateRole) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertGP attempts an insert, and does an update or ignore on conflict. Panics on error.

func (*BoilerplateRole) UpsertP

func (o *BoilerplateRole) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertP attempts an insert using an executor, and does an update or ignore on conflict. UpsertP panics on error.

type BoilerplateRoleHook

type BoilerplateRoleHook func(boil.Executor, *BoilerplateRole) error

BoilerplateRoleHook is the signature for custom BoilerplateRole hook methods

type BoilerplateRoleSlice

type BoilerplateRoleSlice []*BoilerplateRole

BoilerplateRoleSlice is an alias for a slice of pointers to BoilerplateRole. This should generally be used opposed to []BoilerplateRole.

func (BoilerplateRoleSlice) DeleteAll

func (o BoilerplateRoleSlice) DeleteAll(exec boil.Executor) error

DeleteAll deletes all rows in the slice, using an executor.

func (BoilerplateRoleSlice) DeleteAllG

func (o BoilerplateRoleSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (BoilerplateRoleSlice) DeleteAllGP

func (o BoilerplateRoleSlice) DeleteAllGP()

DeleteAllGP deletes all rows in the slice, and panics on error.

func (BoilerplateRoleSlice) DeleteAllP

func (o BoilerplateRoleSlice) DeleteAllP(exec boil.Executor)

DeleteAllP deletes all rows in the slice, using an executor, and panics on error.

func (*BoilerplateRoleSlice) ReloadAll

func (o *BoilerplateRoleSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*BoilerplateRoleSlice) ReloadAllG

func (o *BoilerplateRoleSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*BoilerplateRoleSlice) ReloadAllGP

func (o *BoilerplateRoleSlice) ReloadAllGP()

ReloadAllGP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (*BoilerplateRoleSlice) ReloadAllP

func (o *BoilerplateRoleSlice) ReloadAllP(exec boil.Executor)

ReloadAllP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (BoilerplateRoleSlice) UpdateAll

func (o BoilerplateRoleSlice) UpdateAll(exec boil.Executor, cols M) error

UpdateAll updates all rows with the specified column values, using an executor.

func (BoilerplateRoleSlice) UpdateAllG

func (o BoilerplateRoleSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (BoilerplateRoleSlice) UpdateAllGP

func (o BoilerplateRoleSlice) UpdateAllGP(cols M)

UpdateAllGP updates all rows with the specified column values, and panics on error.

func (BoilerplateRoleSlice) UpdateAllP

func (o BoilerplateRoleSlice) UpdateAllP(exec boil.Executor, cols M)

UpdateAllP updates all rows with the specified column values, and panics on error.

type BoilerplateUser

type BoilerplateUser struct {
	ID        int       `db:"id" boil:"id" json:"id" xml:"id"`
	Username  string    `db:"username" boil:"username" json:"username" xml:"username"`
	Password  string    `db:"password" boil:"password" json:"password" xml:"password"`
	RoleID    int       `db:"role_id" boil:"role_id" json:"role_id" xml:"role_id"`
	CreatedAt null.Time `db:"created_at" boil:"created_at" json:"created_at,omitempty" xml:"created_at,omitempty"`
	UpdatedAt null.Time `db:"updated_at" boil:"updated_at" json:"updated_at,omitempty" xml:"updated_at,omitempty"`

	R *boilerplateUserR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L boilerplateUserL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

BoilerplateUser is an object representing the database table.

func FindBoilerplateUser

func FindBoilerplateUser(exec boil.Executor, id int, selectCols ...string) (*BoilerplateUser, error)

FindBoilerplateUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindBoilerplateUserG

func FindBoilerplateUserG(id int, selectCols ...string) (*BoilerplateUser, error)

FindBoilerplateUserG retrieves a single record by ID.

func FindBoilerplateUserGP

func FindBoilerplateUserGP(id int, selectCols ...string) *BoilerplateUser

FindBoilerplateUserGP retrieves a single record by ID, and panics on error.

func FindBoilerplateUserP

func FindBoilerplateUserP(exec boil.Executor, id int, selectCols ...string) *BoilerplateUser

FindBoilerplateUserP retrieves a single record by ID with an executor, and panics on error.

func (*BoilerplateUser) Delete

func (o *BoilerplateUser) Delete(exec boil.Executor) error

Delete deletes a single BoilerplateUser record with an executor. Delete will match against the primary key column to find the record to delete.

func (*BoilerplateUser) DeleteG

func (o *BoilerplateUser) DeleteG() error

DeleteG deletes a single BoilerplateUser record. DeleteG will match against the primary key column to find the record to delete.

func (*BoilerplateUser) DeleteGP

func (o *BoilerplateUser) DeleteGP()

DeleteGP deletes a single BoilerplateUser record. DeleteGP will match against the primary key column to find the record to delete. Panics on error.

func (*BoilerplateUser) DeleteP

func (o *BoilerplateUser) DeleteP(exec boil.Executor)

DeleteP deletes a single BoilerplateUser record with an executor. DeleteP will match against the primary key column to find the record to delete. Panics on error.

func (*BoilerplateUser) Insert

func (o *BoilerplateUser) Insert(exec boil.Executor, whitelist ...string) error

Insert a single record using an executor. Whitelist behavior: If a whitelist is provided, only those columns supplied are inserted No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns without a default value are included (i.e. name, age) - All columns with a default, but non-zero are included (i.e. health = 75)

func (*BoilerplateUser) InsertG

func (o *BoilerplateUser) InsertG(whitelist ...string) error

InsertG a single record. See Insert for whitelist behavior description.

func (*BoilerplateUser) InsertGP

func (o *BoilerplateUser) InsertGP(whitelist ...string)

InsertGP a single record, and panics on error. See Insert for whitelist behavior description.

func (*BoilerplateUser) InsertP

func (o *BoilerplateUser) InsertP(exec boil.Executor, whitelist ...string)

InsertP a single record using an executor, and panics on error. See Insert for whitelist behavior description.

func (*BoilerplateUser) Reload

func (o *BoilerplateUser) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*BoilerplateUser) ReloadG

func (o *BoilerplateUser) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*BoilerplateUser) ReloadGP

func (o *BoilerplateUser) ReloadGP()

ReloadGP refetches the object from the database and panics on error.

func (*BoilerplateUser) ReloadP

func (o *BoilerplateUser) ReloadP(exec boil.Executor)

ReloadP refetches the object from the database with an executor. Panics on error.

func (*BoilerplateUser) Role

func (o *BoilerplateUser) Role(exec boil.Executor, mods ...qm.QueryMod) boilerplateRoleQuery

Role pointed to by the foreign key.

func (*BoilerplateUser) RoleG

func (o *BoilerplateUser) RoleG(mods ...qm.QueryMod) boilerplateRoleQuery

RoleG pointed to by the foreign key.

func (*BoilerplateUser) SetRole

func (o *BoilerplateUser) SetRole(exec boil.Executor, insert bool, related *BoilerplateRole) error

SetRole of the boilerplate_user to the related item. Sets o.R.Role to related. Adds o to related.R.RoleBoilerplateUsers.

func (*BoilerplateUser) Update

func (o *BoilerplateUser) Update(exec boil.Executor, whitelist ...string) error

Update uses an executor to update the BoilerplateUser. Whitelist behavior: If a whitelist is provided, only the columns given are updated. No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns are inferred to start with - All primary keys are subtracted from this set Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*BoilerplateUser) UpdateG

func (o *BoilerplateUser) UpdateG(whitelist ...string) error

UpdateG a single BoilerplateUser record. See Update for whitelist behavior description.

func (*BoilerplateUser) UpdateGP

func (o *BoilerplateUser) UpdateGP(whitelist ...string)

UpdateGP a single BoilerplateUser record. UpdateGP takes a whitelist of column names that should be updated. Panics on error. See Update for whitelist behavior description.

func (*BoilerplateUser) UpdateP

func (o *BoilerplateUser) UpdateP(exec boil.Executor, whitelist ...string)

UpdateP uses an executor to update the BoilerplateUser, and panics on error. See Update for whitelist behavior description.

func (*BoilerplateUser) Upsert

func (o *BoilerplateUser) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict.

func (*BoilerplateUser) UpsertG

func (o *BoilerplateUser) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*BoilerplateUser) UpsertGP

func (o *BoilerplateUser) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertGP attempts an insert, and does an update or ignore on conflict. Panics on error.

func (*BoilerplateUser) UpsertP

func (o *BoilerplateUser) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertP attempts an insert using an executor, and does an update or ignore on conflict. UpsertP panics on error.

type BoilerplateUserHook

type BoilerplateUserHook func(boil.Executor, *BoilerplateUser) error

BoilerplateUserHook is the signature for custom BoilerplateUser hook methods

type BoilerplateUserSlice

type BoilerplateUserSlice []*BoilerplateUser

BoilerplateUserSlice is an alias for a slice of pointers to BoilerplateUser. This should generally be used opposed to []BoilerplateUser.

func (BoilerplateUserSlice) DeleteAll

func (o BoilerplateUserSlice) DeleteAll(exec boil.Executor) error

DeleteAll deletes all rows in the slice, using an executor.

func (BoilerplateUserSlice) DeleteAllG

func (o BoilerplateUserSlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (BoilerplateUserSlice) DeleteAllGP

func (o BoilerplateUserSlice) DeleteAllGP()

DeleteAllGP deletes all rows in the slice, and panics on error.

func (BoilerplateUserSlice) DeleteAllP

func (o BoilerplateUserSlice) DeleteAllP(exec boil.Executor)

DeleteAllP deletes all rows in the slice, using an executor, and panics on error.

func (*BoilerplateUserSlice) ReloadAll

func (o *BoilerplateUserSlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*BoilerplateUserSlice) ReloadAllG

func (o *BoilerplateUserSlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*BoilerplateUserSlice) ReloadAllGP

func (o *BoilerplateUserSlice) ReloadAllGP()

ReloadAllGP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (*BoilerplateUserSlice) ReloadAllP

func (o *BoilerplateUserSlice) ReloadAllP(exec boil.Executor)

ReloadAllP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (BoilerplateUserSlice) UpdateAll

func (o BoilerplateUserSlice) UpdateAll(exec boil.Executor, cols M) error

UpdateAll updates all rows with the specified column values, using an executor.

func (BoilerplateUserSlice) UpdateAllG

func (o BoilerplateUserSlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (BoilerplateUserSlice) UpdateAllGP

func (o BoilerplateUserSlice) UpdateAllGP(cols M)

UpdateAllGP updates all rows with the specified column values, and panics on error.

func (BoilerplateUserSlice) UpdateAllP

func (o BoilerplateUserSlice) UpdateAllP(exec boil.Executor, cols M)

UpdateAllP updates all rows with the specified column values, and panics on error.

type LadonPolicy

type LadonPolicy struct {
	ID          string `db:"id" boil:"id" json:"id" xml:"id"`
	Description string `db:"description" boil:"description" json:"description" xml:"description"`
	Effect      string `db:"effect" boil:"effect" json:"effect" xml:"effect"`
	Conditions  string `db:"conditions" boil:"conditions" json:"conditions" xml:"conditions"`

	R *ladonPolicyR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L ladonPolicyL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

LadonPolicy is an object representing the database table.

func FindLadonPolicy

func FindLadonPolicy(exec boil.Executor, id string, selectCols ...string) (*LadonPolicy, error)

FindLadonPolicy retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func FindLadonPolicyG

func FindLadonPolicyG(id string, selectCols ...string) (*LadonPolicy, error)

FindLadonPolicyG retrieves a single record by ID.

func FindLadonPolicyGP

func FindLadonPolicyGP(id string, selectCols ...string) *LadonPolicy

FindLadonPolicyGP retrieves a single record by ID, and panics on error.

func FindLadonPolicyP

func FindLadonPolicyP(exec boil.Executor, id string, selectCols ...string) *LadonPolicy

FindLadonPolicyP retrieves a single record by ID with an executor, and panics on error.

func (*LadonPolicy) AddPolicyBoilerplateRoles

func (o *LadonPolicy) AddPolicyBoilerplateRoles(exec boil.Executor, insert bool, related ...*BoilerplateRole) error

AddPolicyBoilerplateRoles adds the given related objects to the existing relationships of the ladon_policy, optionally inserting them as new records. Appends related to o.R.PolicyBoilerplateRoles. Sets related.R.Policy appropriately.

func (*LadonPolicy) Delete

func (o *LadonPolicy) Delete(exec boil.Executor) error

Delete deletes a single LadonPolicy record with an executor. Delete will match against the primary key column to find the record to delete.

func (*LadonPolicy) DeleteG

func (o *LadonPolicy) DeleteG() error

DeleteG deletes a single LadonPolicy record. DeleteG will match against the primary key column to find the record to delete.

func (*LadonPolicy) DeleteGP

func (o *LadonPolicy) DeleteGP()

DeleteGP deletes a single LadonPolicy record. DeleteGP will match against the primary key column to find the record to delete. Panics on error.

func (*LadonPolicy) DeleteP

func (o *LadonPolicy) DeleteP(exec boil.Executor)

DeleteP deletes a single LadonPolicy record with an executor. DeleteP will match against the primary key column to find the record to delete. Panics on error.

func (*LadonPolicy) Insert

func (o *LadonPolicy) Insert(exec boil.Executor, whitelist ...string) error

Insert a single record using an executor. Whitelist behavior: If a whitelist is provided, only those columns supplied are inserted No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns without a default value are included (i.e. name, age) - All columns with a default, but non-zero are included (i.e. health = 75)

func (*LadonPolicy) InsertG

func (o *LadonPolicy) InsertG(whitelist ...string) error

InsertG a single record. See Insert for whitelist behavior description.

func (*LadonPolicy) InsertGP

func (o *LadonPolicy) InsertGP(whitelist ...string)

InsertGP a single record, and panics on error. See Insert for whitelist behavior description.

func (*LadonPolicy) InsertP

func (o *LadonPolicy) InsertP(exec boil.Executor, whitelist ...string)

InsertP a single record using an executor, and panics on error. See Insert for whitelist behavior description.

func (*LadonPolicy) PolicyBoilerplateRoles

func (o *LadonPolicy) PolicyBoilerplateRoles(exec boil.Executor, mods ...qm.QueryMod) boilerplateRoleQuery

PolicyBoilerplateRoles retrieves all the boilerplate_role's boilerplate role with an executor via policy_id column.

func (*LadonPolicy) PolicyBoilerplateRolesG

func (o *LadonPolicy) PolicyBoilerplateRolesG(mods ...qm.QueryMod) boilerplateRoleQuery

PolicyBoilerplateRolesG retrieves all the boilerplate_role's boilerplate role via policy_id column.

func (*LadonPolicy) Reload

func (o *LadonPolicy) Reload(exec boil.Executor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*LadonPolicy) ReloadG

func (o *LadonPolicy) ReloadG() error

ReloadG refetches the object from the database using the primary keys.

func (*LadonPolicy) ReloadGP

func (o *LadonPolicy) ReloadGP()

ReloadGP refetches the object from the database and panics on error.

func (*LadonPolicy) ReloadP

func (o *LadonPolicy) ReloadP(exec boil.Executor)

ReloadP refetches the object from the database with an executor. Panics on error.

func (*LadonPolicy) Update

func (o *LadonPolicy) Update(exec boil.Executor, whitelist ...string) error

Update uses an executor to update the LadonPolicy. Whitelist behavior: If a whitelist is provided, only the columns given are updated. No whitelist behavior: Without a whitelist, columns are inferred by the following rules: - All columns are inferred to start with - All primary keys are subtracted from this set Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*LadonPolicy) UpdateG

func (o *LadonPolicy) UpdateG(whitelist ...string) error

UpdateG a single LadonPolicy record. See Update for whitelist behavior description.

func (*LadonPolicy) UpdateGP

func (o *LadonPolicy) UpdateGP(whitelist ...string)

UpdateGP a single LadonPolicy record. UpdateGP takes a whitelist of column names that should be updated. Panics on error. See Update for whitelist behavior description.

func (*LadonPolicy) UpdateP

func (o *LadonPolicy) UpdateP(exec boil.Executor, whitelist ...string)

UpdateP uses an executor to update the LadonPolicy, and panics on error. See Update for whitelist behavior description.

func (*LadonPolicy) Upsert

func (o *LadonPolicy) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict.

func (*LadonPolicy) UpsertG

func (o *LadonPolicy) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error

UpsertG attempts an insert, and does an update or ignore on conflict.

func (*LadonPolicy) UpsertGP

func (o *LadonPolicy) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertGP attempts an insert, and does an update or ignore on conflict. Panics on error.

func (*LadonPolicy) UpsertP

func (o *LadonPolicy) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string)

UpsertP attempts an insert using an executor, and does an update or ignore on conflict. UpsertP panics on error.

type LadonPolicyHook

type LadonPolicyHook func(boil.Executor, *LadonPolicy) error

LadonPolicyHook is the signature for custom LadonPolicy hook methods

type LadonPolicySlice

type LadonPolicySlice []*LadonPolicy

LadonPolicySlice is an alias for a slice of pointers to LadonPolicy. This should generally be used opposed to []LadonPolicy.

func (LadonPolicySlice) DeleteAll

func (o LadonPolicySlice) DeleteAll(exec boil.Executor) error

DeleteAll deletes all rows in the slice, using an executor.

func (LadonPolicySlice) DeleteAllG

func (o LadonPolicySlice) DeleteAllG() error

DeleteAllG deletes all rows in the slice.

func (LadonPolicySlice) DeleteAllGP

func (o LadonPolicySlice) DeleteAllGP()

DeleteAllGP deletes all rows in the slice, and panics on error.

func (LadonPolicySlice) DeleteAllP

func (o LadonPolicySlice) DeleteAllP(exec boil.Executor)

DeleteAllP deletes all rows in the slice, using an executor, and panics on error.

func (*LadonPolicySlice) ReloadAll

func (o *LadonPolicySlice) ReloadAll(exec boil.Executor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*LadonPolicySlice) ReloadAllG

func (o *LadonPolicySlice) ReloadAllG() error

ReloadAllG refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (*LadonPolicySlice) ReloadAllGP

func (o *LadonPolicySlice) ReloadAllGP()

ReloadAllGP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (*LadonPolicySlice) ReloadAllP

func (o *LadonPolicySlice) ReloadAllP(exec boil.Executor)

ReloadAllP refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice. Panics on error.

func (LadonPolicySlice) UpdateAll

func (o LadonPolicySlice) UpdateAll(exec boil.Executor, cols M) error

UpdateAll updates all rows with the specified column values, using an executor.

func (LadonPolicySlice) UpdateAllG

func (o LadonPolicySlice) UpdateAllG(cols M) error

UpdateAllG updates all rows with the specified column values.

func (LadonPolicySlice) UpdateAllGP

func (o LadonPolicySlice) UpdateAllGP(cols M)

UpdateAllGP updates all rows with the specified column values, and panics on error.

func (LadonPolicySlice) UpdateAllP

func (o LadonPolicySlice) UpdateAllP(exec boil.Executor, cols M)

UpdateAllP updates all rows with the specified column values, and panics on error.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL