nidus-sync/factory/history_speciesabundance.bob.go
Eli Ribble 9010726707
Add initial synchronization of Fieldseeker data by oauth
This involves a lot of copy-pasta of code from the previous version of
this logic in another code base. It'll need to be cleaned up, but for
now I need something sooner rather than later.
2025-11-07 08:34:32 +00:00

2293 lines
74 KiB
Go

// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package factory
import (
"context"
"testing"
models "github.com/Gleipnir-Technology/nidus-sync/models"
"github.com/aarondl/opt/null"
"github.com/aarondl/opt/omit"
"github.com/aarondl/opt/omitnull"
"github.com/jaswdr/faker/v2"
"github.com/stephenafamo/bob"
)
type HistorySpeciesabundanceMod interface {
Apply(context.Context, *HistorySpeciesabundanceTemplate)
}
type HistorySpeciesabundanceModFunc func(context.Context, *HistorySpeciesabundanceTemplate)
func (f HistorySpeciesabundanceModFunc) Apply(ctx context.Context, n *HistorySpeciesabundanceTemplate) {
f(ctx, n)
}
type HistorySpeciesabundanceModSlice []HistorySpeciesabundanceMod
func (mods HistorySpeciesabundanceModSlice) Apply(ctx context.Context, n *HistorySpeciesabundanceTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// HistorySpeciesabundanceTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type HistorySpeciesabundanceTemplate struct {
OrganizationID func() null.Val[int32]
Bloodedfem func() null.Val[int16]
Creationdate func() null.Val[int64]
Creator func() null.Val[string]
Eggs func() null.Val[int16]
Editdate func() null.Val[int64]
Editor func() null.Val[string]
Females func() null.Val[int64]
Gravidfem func() null.Val[int16]
Globalid func() null.Val[string]
Larvae func() null.Val[int16]
Males func() null.Val[int16]
Objectid func() int32
Poolstogen func() null.Val[int16]
Processed func() null.Val[int16]
Pupae func() null.Val[int16]
Species func() null.Val[string]
Total func() null.Val[int64]
TrapdataID func() null.Val[string]
Unknown func() null.Val[int16]
CreatedDate func() null.Val[int64]
CreatedUser func() null.Val[string]
GeometryX func() null.Val[float64]
GeometryY func() null.Val[float64]
LastEditedDate func() null.Val[int64]
LastEditedUser func() null.Val[string]
Globalzscore func() null.Val[float64]
H3R7 func() null.Val[string]
H3R8 func() null.Val[string]
R7score func() null.Val[float64]
R8score func() null.Val[float64]
Yearweek func() null.Val[int64]
Version func() int32
r historySpeciesabundanceR
f *Factory
alreadyPersisted bool
}
type historySpeciesabundanceR struct {
Organization *historySpeciesabundanceROrganizationR
}
type historySpeciesabundanceROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the HistorySpeciesabundanceTemplate
func (o *HistorySpeciesabundanceTemplate) Apply(ctx context.Context, mods ...HistorySpeciesabundanceMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.HistorySpeciesabundance
// according to the relationships in the template. Nothing is inserted into the db
func (t HistorySpeciesabundanceTemplate) setModelRels(o *models.HistorySpeciesabundance) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.HistorySpeciesabundances = append(rel.R.HistorySpeciesabundances, o)
o.OrganizationID = null.From(rel.ID) // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.HistorySpeciesabundanceSetter
// this does nothing with the relationship templates
func (o HistorySpeciesabundanceTemplate) BuildSetter() *models.HistorySpeciesabundanceSetter {
m := &models.HistorySpeciesabundanceSetter{}
if o.OrganizationID != nil {
val := o.OrganizationID()
m.OrganizationID = omitnull.FromNull(val)
}
if o.Bloodedfem != nil {
val := o.Bloodedfem()
m.Bloodedfem = omitnull.FromNull(val)
}
if o.Creationdate != nil {
val := o.Creationdate()
m.Creationdate = omitnull.FromNull(val)
}
if o.Creator != nil {
val := o.Creator()
m.Creator = omitnull.FromNull(val)
}
if o.Eggs != nil {
val := o.Eggs()
m.Eggs = omitnull.FromNull(val)
}
if o.Editdate != nil {
val := o.Editdate()
m.Editdate = omitnull.FromNull(val)
}
if o.Editor != nil {
val := o.Editor()
m.Editor = omitnull.FromNull(val)
}
if o.Females != nil {
val := o.Females()
m.Females = omitnull.FromNull(val)
}
if o.Gravidfem != nil {
val := o.Gravidfem()
m.Gravidfem = omitnull.FromNull(val)
}
if o.Globalid != nil {
val := o.Globalid()
m.Globalid = omitnull.FromNull(val)
}
if o.Larvae != nil {
val := o.Larvae()
m.Larvae = omitnull.FromNull(val)
}
if o.Males != nil {
val := o.Males()
m.Males = omitnull.FromNull(val)
}
if o.Objectid != nil {
val := o.Objectid()
m.Objectid = omit.From(val)
}
if o.Poolstogen != nil {
val := o.Poolstogen()
m.Poolstogen = omitnull.FromNull(val)
}
if o.Processed != nil {
val := o.Processed()
m.Processed = omitnull.FromNull(val)
}
if o.Pupae != nil {
val := o.Pupae()
m.Pupae = omitnull.FromNull(val)
}
if o.Species != nil {
val := o.Species()
m.Species = omitnull.FromNull(val)
}
if o.Total != nil {
val := o.Total()
m.Total = omitnull.FromNull(val)
}
if o.TrapdataID != nil {
val := o.TrapdataID()
m.TrapdataID = omitnull.FromNull(val)
}
if o.Unknown != nil {
val := o.Unknown()
m.Unknown = omitnull.FromNull(val)
}
if o.CreatedDate != nil {
val := o.CreatedDate()
m.CreatedDate = omitnull.FromNull(val)
}
if o.CreatedUser != nil {
val := o.CreatedUser()
m.CreatedUser = omitnull.FromNull(val)
}
if o.GeometryX != nil {
val := o.GeometryX()
m.GeometryX = omitnull.FromNull(val)
}
if o.GeometryY != nil {
val := o.GeometryY()
m.GeometryY = omitnull.FromNull(val)
}
if o.LastEditedDate != nil {
val := o.LastEditedDate()
m.LastEditedDate = omitnull.FromNull(val)
}
if o.LastEditedUser != nil {
val := o.LastEditedUser()
m.LastEditedUser = omitnull.FromNull(val)
}
if o.Globalzscore != nil {
val := o.Globalzscore()
m.Globalzscore = omitnull.FromNull(val)
}
if o.H3R7 != nil {
val := o.H3R7()
m.H3R7 = omitnull.FromNull(val)
}
if o.H3R8 != nil {
val := o.H3R8()
m.H3R8 = omitnull.FromNull(val)
}
if o.R7score != nil {
val := o.R7score()
m.R7score = omitnull.FromNull(val)
}
if o.R8score != nil {
val := o.R8score()
m.R8score = omitnull.FromNull(val)
}
if o.Yearweek != nil {
val := o.Yearweek()
m.Yearweek = omitnull.FromNull(val)
}
if o.Version != nil {
val := o.Version()
m.Version = omit.From(val)
}
return m
}
// BuildManySetter returns an []*models.HistorySpeciesabundanceSetter
// this does nothing with the relationship templates
func (o HistorySpeciesabundanceTemplate) BuildManySetter(number int) []*models.HistorySpeciesabundanceSetter {
m := make([]*models.HistorySpeciesabundanceSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.HistorySpeciesabundance
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use HistorySpeciesabundanceTemplate.Create
func (o HistorySpeciesabundanceTemplate) Build() *models.HistorySpeciesabundance {
m := &models.HistorySpeciesabundance{}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
if o.Bloodedfem != nil {
m.Bloodedfem = o.Bloodedfem()
}
if o.Creationdate != nil {
m.Creationdate = o.Creationdate()
}
if o.Creator != nil {
m.Creator = o.Creator()
}
if o.Eggs != nil {
m.Eggs = o.Eggs()
}
if o.Editdate != nil {
m.Editdate = o.Editdate()
}
if o.Editor != nil {
m.Editor = o.Editor()
}
if o.Females != nil {
m.Females = o.Females()
}
if o.Gravidfem != nil {
m.Gravidfem = o.Gravidfem()
}
if o.Globalid != nil {
m.Globalid = o.Globalid()
}
if o.Larvae != nil {
m.Larvae = o.Larvae()
}
if o.Males != nil {
m.Males = o.Males()
}
if o.Objectid != nil {
m.Objectid = o.Objectid()
}
if o.Poolstogen != nil {
m.Poolstogen = o.Poolstogen()
}
if o.Processed != nil {
m.Processed = o.Processed()
}
if o.Pupae != nil {
m.Pupae = o.Pupae()
}
if o.Species != nil {
m.Species = o.Species()
}
if o.Total != nil {
m.Total = o.Total()
}
if o.TrapdataID != nil {
m.TrapdataID = o.TrapdataID()
}
if o.Unknown != nil {
m.Unknown = o.Unknown()
}
if o.CreatedDate != nil {
m.CreatedDate = o.CreatedDate()
}
if o.CreatedUser != nil {
m.CreatedUser = o.CreatedUser()
}
if o.GeometryX != nil {
m.GeometryX = o.GeometryX()
}
if o.GeometryY != nil {
m.GeometryY = o.GeometryY()
}
if o.LastEditedDate != nil {
m.LastEditedDate = o.LastEditedDate()
}
if o.LastEditedUser != nil {
m.LastEditedUser = o.LastEditedUser()
}
if o.Globalzscore != nil {
m.Globalzscore = o.Globalzscore()
}
if o.H3R7 != nil {
m.H3R7 = o.H3R7()
}
if o.H3R8 != nil {
m.H3R8 = o.H3R8()
}
if o.R7score != nil {
m.R7score = o.R7score()
}
if o.R8score != nil {
m.R8score = o.R8score()
}
if o.Yearweek != nil {
m.Yearweek = o.Yearweek()
}
if o.Version != nil {
m.Version = o.Version()
}
o.setModelRels(m)
return m
}
// BuildMany returns an models.HistorySpeciesabundanceSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use HistorySpeciesabundanceTemplate.CreateMany
func (o HistorySpeciesabundanceTemplate) BuildMany(number int) models.HistorySpeciesabundanceSlice {
m := make(models.HistorySpeciesabundanceSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableHistorySpeciesabundance(m *models.HistorySpeciesabundanceSetter) {
if !(m.Objectid.IsValue()) {
val := random_int32(nil)
m.Objectid = omit.From(val)
}
if !(m.Version.IsValue()) {
val := random_int32(nil)
m.Version = omit.From(val)
}
}
// insertOptRels creates and inserts any optional the relationships on *models.HistorySpeciesabundance
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *HistorySpeciesabundanceTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.HistorySpeciesabundance) error {
var err error
isOrganizationDone, _ := historySpeciesabundanceRelOrganizationCtx.Value(ctx)
if !isOrganizationDone && o.r.Organization != nil {
ctx = historySpeciesabundanceRelOrganizationCtx.WithValue(ctx, true)
if o.r.Organization.o.alreadyPersisted {
m.R.Organization = o.r.Organization.o.Build()
} else {
var rel0 *models.Organization
rel0, err = o.r.Organization.o.Create(ctx, exec)
if err != nil {
return err
}
err = m.AttachOrganization(ctx, exec, rel0)
if err != nil {
return err
}
}
}
return err
}
// Create builds a historySpeciesabundance and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *HistorySpeciesabundanceTemplate) Create(ctx context.Context, exec bob.Executor) (*models.HistorySpeciesabundance, error) {
var err error
opt := o.BuildSetter()
ensureCreatableHistorySpeciesabundance(opt)
m, err := models.HistorySpeciesabundances.Insert(opt).One(ctx, exec)
if err != nil {
return nil, err
}
if err := o.insertOptRels(ctx, exec, m); err != nil {
return nil, err
}
return m, err
}
// MustCreate builds a historySpeciesabundance and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *HistorySpeciesabundanceTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.HistorySpeciesabundance {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a historySpeciesabundance and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (o *HistorySpeciesabundanceTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.HistorySpeciesabundance {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple historySpeciesabundances and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o HistorySpeciesabundanceTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.HistorySpeciesabundanceSlice, error) {
var err error
m := make(models.HistorySpeciesabundanceSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple historySpeciesabundances and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o HistorySpeciesabundanceTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.HistorySpeciesabundanceSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple historySpeciesabundances and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (o HistorySpeciesabundanceTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.HistorySpeciesabundanceSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// HistorySpeciesabundance has methods that act as mods for the HistorySpeciesabundanceTemplate
var HistorySpeciesabundanceMods historySpeciesabundanceMods
type historySpeciesabundanceMods struct{}
func (m historySpeciesabundanceMods) RandomizeAllColumns(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModSlice{
HistorySpeciesabundanceMods.RandomOrganizationID(f),
HistorySpeciesabundanceMods.RandomBloodedfem(f),
HistorySpeciesabundanceMods.RandomCreationdate(f),
HistorySpeciesabundanceMods.RandomCreator(f),
HistorySpeciesabundanceMods.RandomEggs(f),
HistorySpeciesabundanceMods.RandomEditdate(f),
HistorySpeciesabundanceMods.RandomEditor(f),
HistorySpeciesabundanceMods.RandomFemales(f),
HistorySpeciesabundanceMods.RandomGravidfem(f),
HistorySpeciesabundanceMods.RandomGlobalid(f),
HistorySpeciesabundanceMods.RandomLarvae(f),
HistorySpeciesabundanceMods.RandomMales(f),
HistorySpeciesabundanceMods.RandomObjectid(f),
HistorySpeciesabundanceMods.RandomPoolstogen(f),
HistorySpeciesabundanceMods.RandomProcessed(f),
HistorySpeciesabundanceMods.RandomPupae(f),
HistorySpeciesabundanceMods.RandomSpecies(f),
HistorySpeciesabundanceMods.RandomTotal(f),
HistorySpeciesabundanceMods.RandomTrapdataID(f),
HistorySpeciesabundanceMods.RandomUnknown(f),
HistorySpeciesabundanceMods.RandomCreatedDate(f),
HistorySpeciesabundanceMods.RandomCreatedUser(f),
HistorySpeciesabundanceMods.RandomGeometryX(f),
HistorySpeciesabundanceMods.RandomGeometryY(f),
HistorySpeciesabundanceMods.RandomLastEditedDate(f),
HistorySpeciesabundanceMods.RandomLastEditedUser(f),
HistorySpeciesabundanceMods.RandomGlobalzscore(f),
HistorySpeciesabundanceMods.RandomH3R7(f),
HistorySpeciesabundanceMods.RandomH3R8(f),
HistorySpeciesabundanceMods.RandomR7score(f),
HistorySpeciesabundanceMods.RandomR8score(f),
HistorySpeciesabundanceMods.RandomYearweek(f),
HistorySpeciesabundanceMods.RandomVersion(f),
}
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) OrganizationID(val null.Val[int32]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.OrganizationID = func() null.Val[int32] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) OrganizationIDFunc(f func() null.Val[int32]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetOrganizationID() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.OrganizationID = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomOrganizationID(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.OrganizationID = func() null.Val[int32] {
if f == nil {
f = &defaultFaker
}
val := random_int32(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomOrganizationIDNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.OrganizationID = func() null.Val[int32] {
if f == nil {
f = &defaultFaker
}
val := random_int32(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Bloodedfem(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Bloodedfem = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) BloodedfemFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Bloodedfem = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetBloodedfem() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Bloodedfem = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomBloodedfem(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Bloodedfem = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomBloodedfemNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Bloodedfem = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Creationdate(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creationdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) CreationdateFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetCreationdate() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creationdate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomCreationdate(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creationdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomCreationdateNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creationdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Creator(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) CreatorFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetCreator() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creator = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomCreator(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creator = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomCreatorNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Creator = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Eggs(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Eggs = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) EggsFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Eggs = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetEggs() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Eggs = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomEggs(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Eggs = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomEggsNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Eggs = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Editdate(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) EditdateFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetEditdate() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editdate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomEditdate(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomEditdateNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Editor(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) EditorFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetEditor() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editor = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomEditor(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editor = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomEditorNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Editor = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Females(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Females = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) FemalesFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Females = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetFemales() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Females = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomFemales(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Females = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomFemalesNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Females = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Gravidfem(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Gravidfem = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) GravidfemFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Gravidfem = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetGravidfem() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Gravidfem = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomGravidfem(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Gravidfem = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomGravidfemNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Gravidfem = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Globalid(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) GlobalidFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetGlobalid() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalid = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomGlobalid(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalid = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomGlobalidNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalid = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Larvae(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Larvae = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) LarvaeFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Larvae = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetLarvae() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Larvae = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomLarvae(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Larvae = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomLarvaeNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Larvae = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Males(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Males = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) MalesFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Males = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetMales() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Males = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomMales(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Males = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomMalesNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Males = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Objectid(val int32) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Objectid = func() int32 { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) ObjectidFunc(f func() int32) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetObjectid() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Objectid = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m historySpeciesabundanceMods) RandomObjectid(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Objectid = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Poolstogen(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Poolstogen = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) PoolstogenFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Poolstogen = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetPoolstogen() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Poolstogen = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomPoolstogen(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Poolstogen = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomPoolstogenNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Poolstogen = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Processed(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Processed = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) ProcessedFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Processed = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetProcessed() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Processed = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomProcessed(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Processed = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomProcessedNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Processed = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Pupae(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Pupae = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) PupaeFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Pupae = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetPupae() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Pupae = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomPupae(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Pupae = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomPupaeNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Pupae = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Species(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Species = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) SpeciesFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Species = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetSpecies() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Species = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomSpecies(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Species = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomSpeciesNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Species = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Total(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Total = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) TotalFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Total = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetTotal() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Total = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomTotal(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Total = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomTotalNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Total = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) TrapdataID(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.TrapdataID = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) TrapdataIDFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.TrapdataID = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetTrapdataID() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.TrapdataID = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomTrapdataID(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.TrapdataID = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomTrapdataIDNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.TrapdataID = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Unknown(val null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Unknown = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) UnknownFunc(f func() null.Val[int16]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Unknown = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetUnknown() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Unknown = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomUnknown(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Unknown = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomUnknownNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Unknown = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) CreatedDate(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) CreatedDateFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedDate = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetCreatedDate() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedDate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomCreatedDate(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomCreatedDateNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) CreatedUser(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) CreatedUserFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedUser = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetCreatedUser() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedUser = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomCreatedUser(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedUser = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomCreatedUserNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.CreatedUser = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) GeometryX(val null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryX = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) GeometryXFunc(f func() null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryX = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetGeometryX() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryX = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomGeometryX(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryX = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomGeometryXNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryX = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) GeometryY(val null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryY = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) GeometryYFunc(f func() null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryY = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetGeometryY() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryY = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomGeometryY(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryY = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomGeometryYNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.GeometryY = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) LastEditedDate(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) LastEditedDateFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedDate = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetLastEditedDate() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedDate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomLastEditedDate(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomLastEditedDateNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) LastEditedUser(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) LastEditedUserFunc(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedUser = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetLastEditedUser() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedUser = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomLastEditedUser(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedUser = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomLastEditedUserNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.LastEditedUser = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Globalzscore(val null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalzscore = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) GlobalzscoreFunc(f func() null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalzscore = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetGlobalzscore() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalzscore = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomGlobalzscore(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalzscore = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomGlobalzscoreNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Globalzscore = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) H3R7(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R7 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) H3R7Func(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R7 = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetH3R7() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R7 = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomH3R7(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R7 = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomH3R7NotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R7 = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) H3R8(val null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R8 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) H3R8Func(f func() null.Val[string]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R8 = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetH3R8() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R8 = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomH3R8(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R8 = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomH3R8NotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.H3R8 = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) R7score(val null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R7score = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) R7scoreFunc(f func() null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R7score = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetR7score() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R7score = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomR7score(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R7score = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomR7scoreNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R7score = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) R8score(val null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R8score = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) R8scoreFunc(f func() null.Val[float64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R8score = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetR8score() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R8score = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomR8score(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R8score = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomR8scoreNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.R8score = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Yearweek(val null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Yearweek = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) YearweekFunc(f func() null.Val[int64]) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Yearweek = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetYearweek() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Yearweek = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historySpeciesabundanceMods) RandomYearweek(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Yearweek = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m historySpeciesabundanceMods) RandomYearweekNotNull(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Yearweek = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m historySpeciesabundanceMods) Version(val int32) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Version = func() int32 { return val }
})
}
// Set the Column from the function
func (m historySpeciesabundanceMods) VersionFunc(f func() int32) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Version = f
})
}
// Clear any values for the column
func (m historySpeciesabundanceMods) UnsetVersion() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Version = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m historySpeciesabundanceMods) RandomVersion(f *faker.Faker) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(_ context.Context, o *HistorySpeciesabundanceTemplate) {
o.Version = func() int32 {
return random_int32(f)
}
})
}
func (m historySpeciesabundanceMods) WithParentsCascading() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(ctx context.Context, o *HistorySpeciesabundanceTemplate) {
if isDone, _ := historySpeciesabundanceWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = historySpeciesabundanceWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m historySpeciesabundanceMods) WithOrganization(rel *OrganizationTemplate) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(ctx context.Context, o *HistorySpeciesabundanceTemplate) {
o.r.Organization = &historySpeciesabundanceROrganizationR{
o: rel,
}
})
}
func (m historySpeciesabundanceMods) WithNewOrganization(mods ...OrganizationMod) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(ctx context.Context, o *HistorySpeciesabundanceTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m historySpeciesabundanceMods) WithExistingOrganization(em *models.Organization) HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(ctx context.Context, o *HistorySpeciesabundanceTemplate) {
o.r.Organization = &historySpeciesabundanceROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m historySpeciesabundanceMods) WithoutOrganization() HistorySpeciesabundanceMod {
return HistorySpeciesabundanceModFunc(func(ctx context.Context, o *HistorySpeciesabundanceTemplate) {
o.r.Organization = nil
})
}