Documentation
¶
Index ¶
- Variables
- func AddScaleResultHook(hookPoint boil.HookPoint, scaleResultHook ScaleResultHook)
- func NewQuery(mods ...qm.QueryMod) *queries.Query
- func ScaleResultExists(ctx context.Context, exec boil.ContextExecutor, iD null.Int64) (bool, error)
- func ScaleResults(mods ...qm.QueryMod) scaleResultQuery
- type M
- type ScaleResult
- func (o *ScaleResult) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
- func (o *ScaleResult) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error
- func (o *ScaleResult) Reload(ctx context.Context, exec boil.ContextExecutor) error
- func (o *ScaleResult) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
- type ScaleResultHook
- type ScaleResultSlice
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 ScaleResultColumns = struct { ID string Date string Weight string Bmi string BodyFatPercentage string WaterPercentage string MuscleMassPercentage string BoneMassPercentage string BasalMetabolicRate string VisceralFat string LeanBodyMass string BodyFatMass string BoneMass string MuscleMass string BodyAge string ProteinPercentage string }{ ID: "id", Date: "date", Weight: "weight", Bmi: "bmi", BodyFatPercentage: "body_fat_percentage", WaterPercentage: "water_percentage", MuscleMassPercentage: "muscle_mass_percentage", BoneMassPercentage: "bone_mass_percentage", BasalMetabolicRate: "basal_metabolic_rate", VisceralFat: "visceral_fat", LeanBodyMass: "lean_body_mass", BodyFatMass: "body_fat_mass", BoneMass: "bone_mass", MuscleMass: "muscle_mass", BodyAge: "body_age", ProteinPercentage: "protein_percentage", }
var ScaleResultRels = struct {
}{}
ScaleResultRels is where relationship names are stored.
var ScaleResultTableColumns = struct { ID string Date string Weight string Bmi string BodyFatPercentage string WaterPercentage string MuscleMassPercentage string BoneMassPercentage string BasalMetabolicRate string VisceralFat string LeanBodyMass string BodyFatMass string BoneMass string MuscleMass string BodyAge string ProteinPercentage string }{ ID: "scale_results.id", Date: "scale_results.date", Weight: "scale_results.weight", Bmi: "scale_results.bmi", BodyFatPercentage: "scale_results.body_fat_percentage", WaterPercentage: "scale_results.water_percentage", MuscleMassPercentage: "scale_results.muscle_mass_percentage", BoneMassPercentage: "scale_results.bone_mass_percentage", BasalMetabolicRate: "scale_results.basal_metabolic_rate", VisceralFat: "scale_results.visceral_fat", LeanBodyMass: "scale_results.lean_body_mass", BodyFatMass: "scale_results.body_fat_mass", BoneMass: "scale_results.bone_mass", MuscleMass: "scale_results.muscle_mass", BodyAge: "scale_results.body_age", ProteinPercentage: "scale_results.protein_percentage", }
var ScaleResultWhere = struct { ID whereHelpernull_Int64 Date whereHelperstring Weight whereHelperfloat64 Bmi whereHelperfloat64 BodyFatPercentage whereHelperfloat64 WaterPercentage whereHelperfloat64 MuscleMassPercentage whereHelperfloat64 BoneMassPercentage whereHelperfloat64 BasalMetabolicRate whereHelperfloat64 VisceralFat whereHelperfloat64 LeanBodyMass whereHelperfloat64 BodyFatMass whereHelperfloat64 BoneMass whereHelperfloat64 MuscleMass whereHelperfloat64 BodyAge whereHelperfloat64 ProteinPercentage whereHelperfloat64 }{ ID: whereHelpernull_Int64{/* contains filtered or unexported fields */}, Date: whereHelperstring{/* contains filtered or unexported fields */}, Weight: whereHelperfloat64{/* contains filtered or unexported fields */}, Bmi: whereHelperfloat64{/* contains filtered or unexported fields */}, BodyFatPercentage: whereHelperfloat64{/* contains filtered or unexported fields */}, WaterPercentage: whereHelperfloat64{/* contains filtered or unexported fields */}, MuscleMassPercentage: whereHelperfloat64{/* contains filtered or unexported fields */}, BoneMassPercentage: whereHelperfloat64{/* contains filtered or unexported fields */}, BasalMetabolicRate: whereHelperfloat64{/* contains filtered or unexported fields */}, VisceralFat: whereHelperfloat64{/* contains filtered or unexported fields */}, LeanBodyMass: whereHelperfloat64{/* contains filtered or unexported fields */}, BodyFatMass: whereHelperfloat64{/* contains filtered or unexported fields */}, BoneMass: whereHelperfloat64{/* contains filtered or unexported fields */}, MuscleMass: whereHelperfloat64{/* contains filtered or unexported fields */}, BodyAge: whereHelperfloat64{/* contains filtered or unexported fields */}, ProteinPercentage: whereHelperfloat64{/* contains filtered or unexported fields */}, }
var TableNames = struct { ScaleResults string }{ ScaleResults: "scale_results", }
Functions ¶
func AddScaleResultHook ¶
func AddScaleResultHook(hookPoint boil.HookPoint, scaleResultHook ScaleResultHook)
AddScaleResultHook registers your hook function for all future operations.
func ScaleResultExists ¶
ScaleResultExists checks if the ScaleResult row exists.
func ScaleResults ¶
ScaleResults 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 ScaleResult ¶
type ScaleResult struct { ID null.Int64 `boil:"id" json:"id,omitempty" toml:"id" yaml:"id,omitempty"` Date string `boil:"date" json:"date" toml:"date" yaml:"date"` Weight float64 `boil:"weight" json:"weight" toml:"weight" yaml:"weight"` Bmi float64 `boil:"bmi" json:"bmi" toml:"bmi" yaml:"bmi"` BodyFatPercentage float64 `boil:"body_fat_percentage" json:"body_fat_percentage" toml:"body_fat_percentage" yaml:"body_fat_percentage"` WaterPercentage float64 `boil:"water_percentage" json:"water_percentage" toml:"water_percentage" yaml:"water_percentage"` MuscleMassPercentage float64 `boil:"muscle_mass_percentage" json:"muscle_mass_percentage" toml:"muscle_mass_percentage" yaml:"muscle_mass_percentage"` BoneMassPercentage float64 `boil:"bone_mass_percentage" json:"bone_mass_percentage" toml:"bone_mass_percentage" yaml:"bone_mass_percentage"` BasalMetabolicRate float64 `boil:"basal_metabolic_rate" json:"basal_metabolic_rate" toml:"basal_metabolic_rate" yaml:"basal_metabolic_rate"` VisceralFat float64 `boil:"visceral_fat" json:"visceral_fat" toml:"visceral_fat" yaml:"visceral_fat"` LeanBodyMass float64 `boil:"lean_body_mass" json:"lean_body_mass" toml:"lean_body_mass" yaml:"lean_body_mass"` BodyFatMass float64 `boil:"body_fat_mass" json:"body_fat_mass" toml:"body_fat_mass" yaml:"body_fat_mass"` BoneMass float64 `boil:"bone_mass" json:"bone_mass" toml:"bone_mass" yaml:"bone_mass"` MuscleMass float64 `boil:"muscle_mass" json:"muscle_mass" toml:"muscle_mass" yaml:"muscle_mass"` BodyAge float64 `boil:"body_age" json:"body_age" toml:"body_age" yaml:"body_age"` ProteinPercentage float64 `boil:"protein_percentage" json:"protein_percentage" toml:"protein_percentage" yaml:"protein_percentage"` R *scaleResultR `boil:"-" json:"-" toml:"-" yaml:"-"` L scaleResultL `boil:"-" json:"-" toml:"-" yaml:"-"` }
ScaleResult is an object representing the database table.
func FindScaleResult ¶
func FindScaleResult(ctx context.Context, exec boil.ContextExecutor, iD null.Int64, selectCols ...string) (*ScaleResult, error)
FindScaleResult retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.
func (*ScaleResult) Delete ¶
func (o *ScaleResult) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)
Delete deletes a single ScaleResult record with an executor. Delete will match against the primary key column to find the record to delete.
func (*ScaleResult) Insert ¶
func (o *ScaleResult) 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 (*ScaleResult) Reload ¶
func (o *ScaleResult) Reload(ctx context.Context, exec boil.ContextExecutor) error
Reload refetches the object from the database using the primary keys with an executor.
func (*ScaleResult) Update ¶
func (o *ScaleResult) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)
Update uses an executor to update the ScaleResult. 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.
type ScaleResultHook ¶
type ScaleResultHook func(context.Context, boil.ContextExecutor, *ScaleResult) error
ScaleResultHook is the signature for custom ScaleResult hook methods
type ScaleResultSlice ¶
type ScaleResultSlice []*ScaleResult
ScaleResultSlice is an alias for a slice of pointers to ScaleResult. This should almost always be used instead of []ScaleResult.
func (ScaleResultSlice) DeleteAll ¶
func (o ScaleResultSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)
DeleteAll deletes all rows in the slice, using an executor.
func (*ScaleResultSlice) ReloadAll ¶
func (o *ScaleResultSlice) 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 (ScaleResultSlice) UpdateAll ¶
func (o ScaleResultSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)
UpdateAll updates all rows with the specified column values, using an executor.