Documentation ¶
Index ¶
- Variables
- func AddCommunityHook(hookPoint boil.HookPoint, communityHook CommunityHook)
- func AddGorpMigrationHook(hookPoint boil.HookPoint, gorpMigrationHook GorpMigrationHook)
- func Communities(mods ...qm.QueryMod) communityQuery
- func CommunityExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func GorpMigrationExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)
- func GorpMigrations(mods ...qm.QueryMod) gorpMigrationQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- type Community
- func (o *Community) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Community) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *Community) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Community) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Community) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Community) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type CommunityHook
- type CommunitySlice
- type GorpMigration
- func (o *GorpMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *GorpMigration) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
- func (o *GorpMigration) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *GorpMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *GorpMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *GorpMigration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type GorpMigrationHook
- type GorpMigrationSlice
- func (o GorpMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *GorpMigrationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error
- func (o GorpMigrationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
- type M
- type UpsertOptionFunc
- type UpsertOptions
Constants ¶
This section is empty.
Variables ¶
var CommunityColumns = struct { ID string Password string Clients string Persistent string }{ ID: "id", Password: "password", Clients: "clients", Persistent: "persistent", }
var CommunityRels = struct {
}{}
CommunityRels is where relationship names are stored.
var CommunityTableColumns = struct { ID string Password string Clients string Persistent string }{ ID: "communities.id", Password: "communities.password", Clients: "communities.clients", Persistent: "communities.persistent", }
var CommunityWhere = struct { ID whereHelperstring Password whereHelperstring Clients whereHelperint Persistent whereHelperbool }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, Password: whereHelperstring{/* contains filtered or unexported fields */}, Clients: whereHelperint{/* contains filtered or unexported fields */}, Persistent: 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 GorpMigrationColumns = struct { ID string AppliedAt string }{ ID: "id", AppliedAt: "applied_at", }
var GorpMigrationRels = struct {
}{}
GorpMigrationRels is where relationship names are stored.
var GorpMigrationTableColumns = struct { ID string AppliedAt string }{ ID: "gorp_migrations.id", AppliedAt: "gorp_migrations.applied_at", }
var GorpMigrationWhere = struct { ID whereHelperstring AppliedAt whereHelpernull_Time }{ ID: whereHelperstring{/* contains filtered or unexported fields */}, AppliedAt: whereHelpernull_Time{/* contains filtered or unexported fields */}, }
var TableNames = struct { Communities string GorpMigrations string }{ Communities: "communities", GorpMigrations: "gorp_migrations", }
var ViewNames = struct {
}{}
Functions ¶
func AddCommunityHook ¶
func AddCommunityHook(hookPoint boil.HookPoint, communityHook CommunityHook)
AddCommunityHook registers your hook function for all future operations.
func AddGorpMigrationHook ¶
func AddGorpMigrationHook(hookPoint boil.HookPoint, gorpMigrationHook GorpMigrationHook)
AddGorpMigrationHook registers your hook function for all future operations.
func Communities ¶
Communities retrieves all the records using an executor.
func CommunityExists ¶
CommunityExists checks if the Community row exists.
func GorpMigrationExists ¶
GorpMigrationExists checks if the GorpMigration row exists.
func GorpMigrations ¶
GorpMigrations retrieves all the records using an executor.
Types ¶
type Community ¶
type Community struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` Password string `boil:"password" json:"password" toml:"password" yaml:"password"` Clients int `boil:"clients" json:"clients" toml:"clients" yaml:"clients"` Persistent bool `boil:"persistent" json:"persistent" toml:"persistent" yaml:"persistent"` R *communityR `boil:"-" json:"-" toml:"-" yaml:"-"` L communityL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Community is an object representing the database table.
func FindCommunity ¶
func FindCommunity(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Community, error)
FindCommunity retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Community) Delete ¶
Delete deletes a single Community record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Community) Insert ¶
func (o *Community) 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 (*Community) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Community) Update ¶
func (o *Community) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Community. 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 (*Community) Upsert ¶
func (o *Community) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 CommunityHook ¶
CommunityHook is the signature for custom Community hook methods
type CommunitySlice ¶
type CommunitySlice []*Community
CommunitySlice is an alias for a slice of pointers to Community. This should almost always be used instead of []Community.
func (CommunitySlice) DeleteAll ¶
func (o CommunitySlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*CommunitySlice) ReloadAll ¶
func (o *CommunitySlice) 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 (CommunitySlice) UpdateAll ¶
func (o CommunitySlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.
type GorpMigration ¶
type GorpMigration struct { ID string `boil:"id" json:"id" toml:"id" yaml:"id"` AppliedAt null.Time `boil:"applied_at" json:"applied_at,omitempty" toml:"applied_at" yaml:"applied_at,omitempty"` R *gorpMigrationR `boil:"-" json:"-" toml:"-" yaml:"-"` L gorpMigrationL `boil:"-" json:"-" toml:"-" yaml:"-"` }
GorpMigration is an object representing the database table.
func FindGorpMigration ¶
func FindGorpMigration(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*GorpMigration, error)
FindGorpMigration retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*GorpMigration) Delete ¶
func (o *GorpMigration) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single GorpMigration record with an executor. Delete will match against the primary key column to find the record to delete.
func (*GorpMigration) Exists ¶ added in v0.2.7
func (o *GorpMigration) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)
Exists checks if the GorpMigration row exists.
func (*GorpMigration) Insert ¶
func (o *GorpMigration) 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 (*GorpMigration) Reload ¶
func (o *GorpMigration) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*GorpMigration) Update ¶
func (o *GorpMigration) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the GorpMigration. 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 (*GorpMigration) Upsert ¶
func (o *GorpMigration) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) 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 GorpMigrationHook ¶
type GorpMigrationHook func(context.Context, boil.ContextExecutor, *GorpMigration) error
GorpMigrationHook is the signature for custom GorpMigration hook methods
type GorpMigrationSlice ¶
type GorpMigrationSlice []*GorpMigration
GorpMigrationSlice is an alias for a slice of pointers to GorpMigration. This should almost always be used instead of []GorpMigration.
func (GorpMigrationSlice) DeleteAll ¶
func (o GorpMigrationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*GorpMigrationSlice) ReloadAll ¶
func (o *GorpMigrationSlice) 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 (GorpMigrationSlice) UpdateAll ¶
func (o GorpMigrationSlice) 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 UpsertOptionFunc ¶ added in v0.2.7
type UpsertOptionFunc func(o *UpsertOptions)
func UpsertConflictTarget ¶ added in v0.2.7
func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc
func UpsertUpdateSet ¶ added in v0.2.7
func UpsertUpdateSet(updateSet string) UpsertOptionFunc
type UpsertOptions ¶ added in v0.2.7
type UpsertOptions struct {
// contains filtered or unexported fields
}