Documentation ¶
Index ¶
- Constants
- Variables
- func AddIssuanceWeekHook(hookPoint boil.HookPoint, issuanceWeekHook IssuanceWeekHook)
- func AddRewardHook(hookPoint boil.HookPoint, rewardHook RewardHook)
- func IssuanceWeekExists(ctx context.Context, exec boil.ContextExecutor, iD int) (bool, error)
- func IssuanceWeeks(mods ...qm.QueryMod) issuanceWeekQuery
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func RewardExists(ctx context.Context, exec boil.ContextExecutor, issuanceWeekID int, ...) (bool, error)
- func Rewards(mods ...qm.QueryMod) rewardQuery
- type IssuanceWeek
- func (o *IssuanceWeek) AddRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *IssuanceWeek) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *IssuanceWeek) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *IssuanceWeek) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *IssuanceWeek) Rewards(mods ...qm.QueryMod) rewardQuery
- func (o *IssuanceWeek) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *IssuanceWeek) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type IssuanceWeekHook
- type IssuanceWeekSlice
- type M
- type Reward
- func (o *Reward) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *Reward) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *Reward) IssuanceWeek(mods ...qm.QueryMod) issuanceWeekQuery
- func (o *Reward) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *Reward) SetIssuanceWeek(ctx context.Context, exec boil.ContextExecutor, insert bool, ...) error
- func (o *Reward) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- func (o *Reward) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, ...) error
- type RewardHook
- type RewardSlice
Constants ¶
const ( IssuanceWeeksJobStatusStarted = "Started" IssuanceWeeksJobStatusFailed = "Failed" IssuanceWeeksJobStatusFinished = "Finished" )
Enum values for IssuanceWeeksJobStatus
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 IssuanceWeekColumns = struct { ID string JobStatus string CreatedAt string UpdatedAt string StartsAt string EndsAt string }{ ID: "id", JobStatus: "job_status", CreatedAt: "created_at", UpdatedAt: "updated_at", StartsAt: "starts_at", EndsAt: "ends_at", }
var IssuanceWeekRels = struct { Rewards string }{ Rewards: "Rewards", }
IssuanceWeekRels is where relationship names are stored.
var IssuanceWeekTableColumns = struct { ID string JobStatus string CreatedAt string UpdatedAt string StartsAt string EndsAt string }{ ID: "issuance_weeks.id", JobStatus: "issuance_weeks.job_status", CreatedAt: "issuance_weeks.created_at", UpdatedAt: "issuance_weeks.updated_at", StartsAt: "issuance_weeks.starts_at", EndsAt: "issuance_weeks.ends_at", }
var IssuanceWeekWhere = struct { ID whereHelperint JobStatus whereHelperstring CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time StartsAt whereHelpertime_Time EndsAt whereHelpertime_Time }{ ID: whereHelperint{/* contains filtered or unexported fields */}, JobStatus: whereHelperstring{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, StartsAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, EndsAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, }
var RewardColumns = struct { IssuanceWeekID string UserDeviceID string UserID string ConnectionStreak string DisconnectionStreak string StreakPoints string IntegrationIds string IntegrationPoints string CreatedAt string UpdatedAt string Override string }{ IssuanceWeekID: "issuance_week_id", UserDeviceID: "user_device_id", UserID: "user_id", ConnectionStreak: "connection_streak", DisconnectionStreak: "disconnection_streak", StreakPoints: "streak_points", IntegrationIds: "integration_ids", IntegrationPoints: "integration_points", CreatedAt: "created_at", UpdatedAt: "updated_at", Override: "override", }
var RewardRels = struct { IssuanceWeek string }{ IssuanceWeek: "IssuanceWeek", }
RewardRels is where relationship names are stored.
var RewardTableColumns = struct { IssuanceWeekID string UserDeviceID string UserID string ConnectionStreak string DisconnectionStreak string StreakPoints string IntegrationIds string IntegrationPoints string CreatedAt string UpdatedAt string Override string }{ IssuanceWeekID: "rewards.issuance_week_id", UserDeviceID: "rewards.user_device_id", UserID: "rewards.user_id", ConnectionStreak: "rewards.connection_streak", DisconnectionStreak: "rewards.disconnection_streak", StreakPoints: "rewards.streak_points", IntegrationIds: "rewards.integration_ids", IntegrationPoints: "rewards.integration_points", CreatedAt: "rewards.created_at", UpdatedAt: "rewards.updated_at", Override: "rewards.override", }
var RewardWhere = struct { IssuanceWeekID whereHelperint UserDeviceID whereHelperstring UserID whereHelperstring ConnectionStreak whereHelperint DisconnectionStreak whereHelperint StreakPoints whereHelperint IntegrationIds whereHelpertypes_StringArray IntegrationPoints whereHelperint CreatedAt whereHelpertime_Time UpdatedAt whereHelpertime_Time Override whereHelperbool }{ IssuanceWeekID: whereHelperint{/* contains filtered or unexported fields */}, UserDeviceID: whereHelperstring{/* contains filtered or unexported fields */}, UserID: whereHelperstring{/* contains filtered or unexported fields */}, ConnectionStreak: whereHelperint{/* contains filtered or unexported fields */}, DisconnectionStreak: whereHelperint{/* contains filtered or unexported fields */}, StreakPoints: whereHelperint{/* contains filtered or unexported fields */}, IntegrationIds: whereHelpertypes_StringArray{/* contains filtered or unexported fields */}, IntegrationPoints: whereHelperint{/* contains filtered or unexported fields */}, CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */}, Override: whereHelperbool{/* contains filtered or unexported fields */}, }
var TableNames = struct { IssuanceWeeks string Rewards string }{ IssuanceWeeks: "issuance_weeks", Rewards: "rewards", }
var ViewNames = struct {
}{}
Functions ¶
func AddIssuanceWeekHook ¶
func AddIssuanceWeekHook(hookPoint boil.HookPoint, issuanceWeekHook IssuanceWeekHook)
AddIssuanceWeekHook registers your hook function for all future operations.
func AddRewardHook ¶
func AddRewardHook(hookPoint boil.HookPoint, rewardHook RewardHook)
AddRewardHook registers your hook function for all future operations.
func IssuanceWeekExists ¶
IssuanceWeekExists checks if the IssuanceWeek row exists.
func IssuanceWeeks ¶
IssuanceWeeks retrieves all the records using an executor.
func RewardExists ¶
func RewardExists(ctx context.Context, exec boil.ContextExecutor, issuanceWeekID int, userDeviceID string) (bool, error)
RewardExists checks if the Reward row exists.
Types ¶
type IssuanceWeek ¶
type IssuanceWeek struct { ID int `boil:"id" json:"id" toml:"id" yaml:"id"` JobStatus string `boil:"job_status" json:"job_status" toml:"job_status" yaml:"job_status"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` StartsAt time.Time `boil:"starts_at" json:"starts_at" toml:"starts_at" yaml:"starts_at"` EndsAt time.Time `boil:"ends_at" json:"ends_at" toml:"ends_at" yaml:"ends_at"` R *issuanceWeekR `boil:"-" json:"-" toml:"-" yaml:"-"` L issuanceWeekL `boil:"-" json:"-" toml:"-" yaml:"-"` }
IssuanceWeek is an object representing the database table.
func FindIssuanceWeek ¶
func FindIssuanceWeek(ctx context.Context, exec boil.ContextExecutor, iD int, selectCols ...string) (*IssuanceWeek, error)
FindIssuanceWeek retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*IssuanceWeek) AddRewards ¶
func (o *IssuanceWeek) AddRewards(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Reward) error
AddRewards adds the given related objects to the existing relationships of the issuance_week, optionally inserting them as new records. Appends related to o.R.Rewards. Sets related.R.IssuanceWeek appropriately.
func (*IssuanceWeek) Delete ¶
func (o *IssuanceWeek) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single IssuanceWeek record with an executor. Delete will match against the primary key column to find the record to delete.
func (*IssuanceWeek) Insert ¶
func (o *IssuanceWeek) 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 (*IssuanceWeek) Reload ¶
func (o *IssuanceWeek) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*IssuanceWeek) Rewards ¶
func (o *IssuanceWeek) Rewards(mods ...qm.QueryMod) rewardQuery
Rewards retrieves all the reward's Rewards with an executor.
func (*IssuanceWeek) Update ¶
func (o *IssuanceWeek) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the IssuanceWeek. 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 (*IssuanceWeek) Upsert ¶
func (o *IssuanceWeek) 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 IssuanceWeekHook ¶
type IssuanceWeekHook func(context.Context, boil.ContextExecutor, *IssuanceWeek) error
IssuanceWeekHook is the signature for custom IssuanceWeek hook methods
type IssuanceWeekSlice ¶
type IssuanceWeekSlice []*IssuanceWeek
IssuanceWeekSlice is an alias for a slice of pointers to IssuanceWeek. This should almost always be used instead of []IssuanceWeek.
func (IssuanceWeekSlice) DeleteAll ¶
func (o IssuanceWeekSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*IssuanceWeekSlice) ReloadAll ¶
func (o *IssuanceWeekSlice) 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 (IssuanceWeekSlice) UpdateAll ¶
func (o IssuanceWeekSlice) 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 Reward ¶
type Reward struct { IssuanceWeekID int `boil:"issuance_week_id" json:"issuance_week_id" toml:"issuance_week_id" yaml:"issuance_week_id"` UserDeviceID string `boil:"user_device_id" json:"user_device_id" toml:"user_device_id" yaml:"user_device_id"` UserID string `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"` ConnectionStreak int `boil:"connection_streak" json:"connection_streak" toml:"connection_streak" yaml:"connection_streak"` DisconnectionStreak int `boil:"disconnection_streak" json:"disconnection_streak" toml:"disconnection_streak" yaml:"disconnection_streak"` StreakPoints int `boil:"streak_points" json:"streak_points" toml:"streak_points" yaml:"streak_points"` IntegrationIds types.StringArray `boil:"integration_ids" json:"integration_ids" toml:"integration_ids" yaml:"integration_ids"` IntegrationPoints int `boil:"integration_points" json:"integration_points" toml:"integration_points" yaml:"integration_points"` CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"` UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"` Override bool `boil:"override" json:"override" toml:"override" yaml:"override"` R *rewardR `boil:"-" json:"-" toml:"-" yaml:"-"` L rewardL `boil:"-" json:"-" toml:"-" yaml:"-"` }
Reward is an object representing the database table.
func FindReward ¶
func FindReward(ctx context.Context, exec boil.ContextExecutor, issuanceWeekID int, userDeviceID string, selectCols ...string) (*Reward, error)
FindReward retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*Reward) Delete ¶
Delete deletes a single Reward record with an executor. Delete will match against the primary key column to find the record to delete.
func (*Reward) Insert ¶
Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.
func (*Reward) IssuanceWeek ¶
IssuanceWeek pointed to by the foreign key.
func (*Reward) Reload ¶
Reload refetches the object from the database using the primary keys with an executor.
func (*Reward) SetIssuanceWeek ¶
func (o *Reward) SetIssuanceWeek(ctx context.Context, exec boil.ContextExecutor, insert bool, related *IssuanceWeek) error
SetIssuanceWeek of the reward to the related item. Sets o.R.IssuanceWeek to related. Adds o to related.R.Rewards.
func (*Reward) Update ¶
func (o *Reward) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the Reward. 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 (*Reward) Upsert ¶
func (o *Reward) 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 RewardHook ¶
RewardHook is the signature for custom Reward hook methods
type RewardSlice ¶
type RewardSlice []*Reward
RewardSlice is an alias for a slice of pointers to Reward. This should almost always be used instead of []Reward.
func (RewardSlice) DeleteAll ¶
func (o RewardSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*RewardSlice) ReloadAll ¶
func (o *RewardSlice) 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 (RewardSlice) UpdateAll ¶
func (o RewardSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.