2235 lines
75 KiB
Go
2235 lines
75 KiB
Go
// Code generated by BobGen psql v0.0.4-0.20260105020634-53e08d840e47+dirty. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package factory
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"testing"
|
|
"time"
|
|
|
|
models "github.com/Gleipnir-Technology/nidus-sync/db/models"
|
|
"github.com/aarondl/opt/null"
|
|
"github.com/aarondl/opt/omit"
|
|
"github.com/aarondl/opt/omitnull"
|
|
"github.com/google/uuid"
|
|
"github.com/jaswdr/faker/v2"
|
|
"github.com/stephenafamo/bob"
|
|
"github.com/stephenafamo/bob/types"
|
|
)
|
|
|
|
type FieldseekerSpeciesabundanceMod interface {
|
|
Apply(context.Context, *FieldseekerSpeciesabundanceTemplate)
|
|
}
|
|
|
|
type FieldseekerSpeciesabundanceModFunc func(context.Context, *FieldseekerSpeciesabundanceTemplate)
|
|
|
|
func (f FieldseekerSpeciesabundanceModFunc) Apply(ctx context.Context, n *FieldseekerSpeciesabundanceTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type FieldseekerSpeciesabundanceModSlice []FieldseekerSpeciesabundanceMod
|
|
|
|
func (mods FieldseekerSpeciesabundanceModSlice) Apply(ctx context.Context, n *FieldseekerSpeciesabundanceTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// FieldseekerSpeciesabundanceTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type FieldseekerSpeciesabundanceTemplate struct {
|
|
Objectid func() int64
|
|
TrapdataID func() null.Val[uuid.UUID]
|
|
Species func() null.Val[string]
|
|
Males func() null.Val[int16]
|
|
Unknown func() null.Val[int16]
|
|
Bloodedfem func() null.Val[int16]
|
|
Gravidfem func() null.Val[int16]
|
|
Larvae func() null.Val[int16]
|
|
Poolstogen func() null.Val[int16]
|
|
Processed func() null.Val[int16]
|
|
Globalid func() uuid.UUID
|
|
CreatedUser func() null.Val[string]
|
|
CreatedDate func() null.Val[time.Time]
|
|
LastEditedUser func() null.Val[string]
|
|
LastEditedDate func() null.Val[time.Time]
|
|
Pupae func() null.Val[int16]
|
|
Eggs func() null.Val[int16]
|
|
Females func() null.Val[int32]
|
|
Total func() null.Val[int32]
|
|
Creationdate func() null.Val[time.Time]
|
|
Creator func() null.Val[string]
|
|
Editdate func() null.Val[time.Time]
|
|
Editor func() null.Val[string]
|
|
Yearweek func() null.Val[int32]
|
|
Globalzscore func() null.Val[float64]
|
|
R7score func() null.Val[float64]
|
|
R8score func() null.Val[float64]
|
|
H3R7 func() null.Val[string]
|
|
H3R8 func() null.Val[string]
|
|
Geometry func() types.JSON[json.RawMessage]
|
|
Geospatial func() null.Val[string]
|
|
Version func() int32
|
|
OrganizationID func() int32
|
|
|
|
r fieldseekerSpeciesabundanceR
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
type fieldseekerSpeciesabundanceR struct {
|
|
Organization *fieldseekerSpeciesabundanceROrganizationR
|
|
}
|
|
|
|
type fieldseekerSpeciesabundanceROrganizationR struct {
|
|
o *OrganizationTemplate
|
|
}
|
|
|
|
// Apply mods to the FieldseekerSpeciesabundanceTemplate
|
|
func (o *FieldseekerSpeciesabundanceTemplate) Apply(ctx context.Context, mods ...FieldseekerSpeciesabundanceMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.FieldseekerSpeciesabundance
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t FieldseekerSpeciesabundanceTemplate) setModelRels(o *models.FieldseekerSpeciesabundance) {
|
|
if t.r.Organization != nil {
|
|
rel := t.r.Organization.o.Build()
|
|
rel.R.Speciesabundances = append(rel.R.Speciesabundances, o)
|
|
o.OrganizationID = rel.ID // h2
|
|
o.R.Organization = rel
|
|
}
|
|
}
|
|
|
|
// BuildSetter returns an *models.FieldseekerSpeciesabundanceSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerSpeciesabundanceTemplate) BuildSetter() *models.FieldseekerSpeciesabundanceSetter {
|
|
m := &models.FieldseekerSpeciesabundanceSetter{}
|
|
|
|
if o.Objectid != nil {
|
|
val := o.Objectid()
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if o.TrapdataID != nil {
|
|
val := o.TrapdataID()
|
|
m.TrapdataID = omitnull.FromNull(val)
|
|
}
|
|
if o.Species != nil {
|
|
val := o.Species()
|
|
m.Species = omitnull.FromNull(val)
|
|
}
|
|
if o.Males != nil {
|
|
val := o.Males()
|
|
m.Males = omitnull.FromNull(val)
|
|
}
|
|
if o.Unknown != nil {
|
|
val := o.Unknown()
|
|
m.Unknown = omitnull.FromNull(val)
|
|
}
|
|
if o.Bloodedfem != nil {
|
|
val := o.Bloodedfem()
|
|
m.Bloodedfem = omitnull.FromNull(val)
|
|
}
|
|
if o.Gravidfem != nil {
|
|
val := o.Gravidfem()
|
|
m.Gravidfem = omitnull.FromNull(val)
|
|
}
|
|
if o.Larvae != nil {
|
|
val := o.Larvae()
|
|
m.Larvae = omitnull.FromNull(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.Globalid != nil {
|
|
val := o.Globalid()
|
|
m.Globalid = omit.From(val)
|
|
}
|
|
if o.CreatedUser != nil {
|
|
val := o.CreatedUser()
|
|
m.CreatedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedDate != nil {
|
|
val := o.CreatedDate()
|
|
m.CreatedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
val := o.LastEditedUser()
|
|
m.LastEditedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
val := o.LastEditedDate()
|
|
m.LastEditedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.Pupae != nil {
|
|
val := o.Pupae()
|
|
m.Pupae = omitnull.FromNull(val)
|
|
}
|
|
if o.Eggs != nil {
|
|
val := o.Eggs()
|
|
m.Eggs = omitnull.FromNull(val)
|
|
}
|
|
if o.Females != nil {
|
|
val := o.Females()
|
|
m.Females = omitnull.FromNull(val)
|
|
}
|
|
if o.Total != nil {
|
|
val := o.Total()
|
|
m.Total = 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.Editdate != nil {
|
|
val := o.Editdate()
|
|
m.Editdate = omitnull.FromNull(val)
|
|
}
|
|
if o.Editor != nil {
|
|
val := o.Editor()
|
|
m.Editor = omitnull.FromNull(val)
|
|
}
|
|
if o.Yearweek != nil {
|
|
val := o.Yearweek()
|
|
m.Yearweek = omitnull.FromNull(val)
|
|
}
|
|
if o.Globalzscore != nil {
|
|
val := o.Globalzscore()
|
|
m.Globalzscore = 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.H3R7 != nil {
|
|
val := o.H3R7()
|
|
m.H3R7 = omitnull.FromNull(val)
|
|
}
|
|
if o.H3R8 != nil {
|
|
val := o.H3R8()
|
|
m.H3R8 = omitnull.FromNull(val)
|
|
}
|
|
if o.Geometry != nil {
|
|
val := o.Geometry()
|
|
m.Geometry = omit.From(val)
|
|
}
|
|
if o.Geospatial != nil {
|
|
val := o.Geospatial()
|
|
m.Geospatial = omitnull.FromNull(val)
|
|
}
|
|
if o.Version != nil {
|
|
val := o.Version()
|
|
m.Version = omit.From(val)
|
|
}
|
|
if o.OrganizationID != nil {
|
|
val := o.OrganizationID()
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.FieldseekerSpeciesabundanceSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerSpeciesabundanceTemplate) BuildManySetter(number int) []*models.FieldseekerSpeciesabundanceSetter {
|
|
m := make([]*models.FieldseekerSpeciesabundanceSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.FieldseekerSpeciesabundance
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerSpeciesabundanceTemplate.Create
|
|
func (o FieldseekerSpeciesabundanceTemplate) Build() *models.FieldseekerSpeciesabundance {
|
|
m := &models.FieldseekerSpeciesabundance{}
|
|
|
|
if o.Objectid != nil {
|
|
m.Objectid = o.Objectid()
|
|
}
|
|
if o.TrapdataID != nil {
|
|
m.TrapdataID = o.TrapdataID()
|
|
}
|
|
if o.Species != nil {
|
|
m.Species = o.Species()
|
|
}
|
|
if o.Males != nil {
|
|
m.Males = o.Males()
|
|
}
|
|
if o.Unknown != nil {
|
|
m.Unknown = o.Unknown()
|
|
}
|
|
if o.Bloodedfem != nil {
|
|
m.Bloodedfem = o.Bloodedfem()
|
|
}
|
|
if o.Gravidfem != nil {
|
|
m.Gravidfem = o.Gravidfem()
|
|
}
|
|
if o.Larvae != nil {
|
|
m.Larvae = o.Larvae()
|
|
}
|
|
if o.Poolstogen != nil {
|
|
m.Poolstogen = o.Poolstogen()
|
|
}
|
|
if o.Processed != nil {
|
|
m.Processed = o.Processed()
|
|
}
|
|
if o.Globalid != nil {
|
|
m.Globalid = o.Globalid()
|
|
}
|
|
if o.CreatedUser != nil {
|
|
m.CreatedUser = o.CreatedUser()
|
|
}
|
|
if o.CreatedDate != nil {
|
|
m.CreatedDate = o.CreatedDate()
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
m.LastEditedUser = o.LastEditedUser()
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
m.LastEditedDate = o.LastEditedDate()
|
|
}
|
|
if o.Pupae != nil {
|
|
m.Pupae = o.Pupae()
|
|
}
|
|
if o.Eggs != nil {
|
|
m.Eggs = o.Eggs()
|
|
}
|
|
if o.Females != nil {
|
|
m.Females = o.Females()
|
|
}
|
|
if o.Total != nil {
|
|
m.Total = o.Total()
|
|
}
|
|
if o.Creationdate != nil {
|
|
m.Creationdate = o.Creationdate()
|
|
}
|
|
if o.Creator != nil {
|
|
m.Creator = o.Creator()
|
|
}
|
|
if o.Editdate != nil {
|
|
m.Editdate = o.Editdate()
|
|
}
|
|
if o.Editor != nil {
|
|
m.Editor = o.Editor()
|
|
}
|
|
if o.Yearweek != nil {
|
|
m.Yearweek = o.Yearweek()
|
|
}
|
|
if o.Globalzscore != nil {
|
|
m.Globalzscore = o.Globalzscore()
|
|
}
|
|
if o.R7score != nil {
|
|
m.R7score = o.R7score()
|
|
}
|
|
if o.R8score != nil {
|
|
m.R8score = o.R8score()
|
|
}
|
|
if o.H3R7 != nil {
|
|
m.H3R7 = o.H3R7()
|
|
}
|
|
if o.H3R8 != nil {
|
|
m.H3R8 = o.H3R8()
|
|
}
|
|
if o.Geometry != nil {
|
|
m.Geometry = o.Geometry()
|
|
}
|
|
if o.Geospatial != nil {
|
|
m.Geospatial = o.Geospatial()
|
|
}
|
|
if o.Version != nil {
|
|
m.Version = o.Version()
|
|
}
|
|
if o.OrganizationID != nil {
|
|
m.OrganizationID = o.OrganizationID()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.FieldseekerSpeciesabundanceSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerSpeciesabundanceTemplate.CreateMany
|
|
func (o FieldseekerSpeciesabundanceTemplate) BuildMany(number int) models.FieldseekerSpeciesabundanceSlice {
|
|
m := make(models.FieldseekerSpeciesabundanceSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableFieldseekerSpeciesabundance(m *models.FieldseekerSpeciesabundanceSetter) {
|
|
if !(m.Globalid.IsValue()) {
|
|
val := random_uuid_UUID(nil)
|
|
m.Globalid = omit.From(val)
|
|
}
|
|
if !(m.Geometry.IsValue()) {
|
|
val := random_types_JSON_json_RawMessage_(nil)
|
|
m.Geometry = omit.From(val)
|
|
}
|
|
if !(m.OrganizationID.IsValue()) {
|
|
val := random_int32(nil)
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
}
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerSpeciesabundance
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *FieldseekerSpeciesabundanceTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerSpeciesabundance) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a fieldseekerSpeciesabundance and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *FieldseekerSpeciesabundanceTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerSpeciesabundance, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableFieldseekerSpeciesabundance(opt)
|
|
|
|
if o.r.Organization == nil {
|
|
FieldseekerSpeciesabundanceMods.WithNewOrganization().Apply(ctx, o)
|
|
}
|
|
|
|
var rel0 *models.Organization
|
|
|
|
if o.r.Organization.o.alreadyPersisted {
|
|
rel0 = o.r.Organization.o.Build()
|
|
} else {
|
|
rel0, err = o.r.Organization.o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
opt.OrganizationID = omit.From(rel0.ID)
|
|
|
|
m, err := models.FieldseekerSpeciesabundances.Insert(opt).One(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
m.R.Organization = rel0
|
|
|
|
if err := o.insertOptRels(ctx, exec, m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, err
|
|
}
|
|
|
|
// MustCreate builds a fieldseekerSpeciesabundance and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *FieldseekerSpeciesabundanceTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerSpeciesabundance {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a fieldseekerSpeciesabundance 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 *FieldseekerSpeciesabundanceTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerSpeciesabundance {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple fieldseekerSpeciesabundances and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o FieldseekerSpeciesabundanceTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerSpeciesabundanceSlice, error) {
|
|
var err error
|
|
m := make(models.FieldseekerSpeciesabundanceSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple fieldseekerSpeciesabundances and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o FieldseekerSpeciesabundanceTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerSpeciesabundanceSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple fieldseekerSpeciesabundances 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 FieldseekerSpeciesabundanceTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerSpeciesabundanceSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// FieldseekerSpeciesabundance has methods that act as mods for the FieldseekerSpeciesabundanceTemplate
|
|
var FieldseekerSpeciesabundanceMods fieldseekerSpeciesabundanceMods
|
|
|
|
type fieldseekerSpeciesabundanceMods struct{}
|
|
|
|
func (m fieldseekerSpeciesabundanceMods) RandomizeAllColumns(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModSlice{
|
|
FieldseekerSpeciesabundanceMods.RandomObjectid(f),
|
|
FieldseekerSpeciesabundanceMods.RandomTrapdataID(f),
|
|
FieldseekerSpeciesabundanceMods.RandomSpecies(f),
|
|
FieldseekerSpeciesabundanceMods.RandomMales(f),
|
|
FieldseekerSpeciesabundanceMods.RandomUnknown(f),
|
|
FieldseekerSpeciesabundanceMods.RandomBloodedfem(f),
|
|
FieldseekerSpeciesabundanceMods.RandomGravidfem(f),
|
|
FieldseekerSpeciesabundanceMods.RandomLarvae(f),
|
|
FieldseekerSpeciesabundanceMods.RandomPoolstogen(f),
|
|
FieldseekerSpeciesabundanceMods.RandomProcessed(f),
|
|
FieldseekerSpeciesabundanceMods.RandomGlobalid(f),
|
|
FieldseekerSpeciesabundanceMods.RandomCreatedUser(f),
|
|
FieldseekerSpeciesabundanceMods.RandomCreatedDate(f),
|
|
FieldseekerSpeciesabundanceMods.RandomLastEditedUser(f),
|
|
FieldseekerSpeciesabundanceMods.RandomLastEditedDate(f),
|
|
FieldseekerSpeciesabundanceMods.RandomPupae(f),
|
|
FieldseekerSpeciesabundanceMods.RandomEggs(f),
|
|
FieldseekerSpeciesabundanceMods.RandomFemales(f),
|
|
FieldseekerSpeciesabundanceMods.RandomTotal(f),
|
|
FieldseekerSpeciesabundanceMods.RandomCreationdate(f),
|
|
FieldseekerSpeciesabundanceMods.RandomCreator(f),
|
|
FieldseekerSpeciesabundanceMods.RandomEditdate(f),
|
|
FieldseekerSpeciesabundanceMods.RandomEditor(f),
|
|
FieldseekerSpeciesabundanceMods.RandomYearweek(f),
|
|
FieldseekerSpeciesabundanceMods.RandomGlobalzscore(f),
|
|
FieldseekerSpeciesabundanceMods.RandomR7score(f),
|
|
FieldseekerSpeciesabundanceMods.RandomR8score(f),
|
|
FieldseekerSpeciesabundanceMods.RandomH3R7(f),
|
|
FieldseekerSpeciesabundanceMods.RandomH3R8(f),
|
|
FieldseekerSpeciesabundanceMods.RandomGeometry(f),
|
|
FieldseekerSpeciesabundanceMods.RandomGeospatial(f),
|
|
FieldseekerSpeciesabundanceMods.RandomVersion(f),
|
|
FieldseekerSpeciesabundanceMods.RandomOrganizationID(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Objectid(val int64) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Objectid = func() int64 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) ObjectidFunc(f func() int64) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetObjectid() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomObjectid(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Objectid = func() int64 {
|
|
return random_int64(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) TrapdataID(val null.Val[uuid.UUID]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.TrapdataID = func() null.Val[uuid.UUID] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) TrapdataIDFunc(f func() null.Val[uuid.UUID]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.TrapdataID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetTrapdataID() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomTrapdataID(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.TrapdataID = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(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 fieldseekerSpeciesabundanceMods) RandomTrapdataIDNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.TrapdataID = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Species(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Species = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) SpeciesFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Species = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetSpecies() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomSpecies(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Species = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
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 fieldseekerSpeciesabundanceMods) RandomSpeciesNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Species = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Males(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Males = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) MalesFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Males = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetMales() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomMales(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomMalesNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Unknown(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Unknown = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) UnknownFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Unknown = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetUnknown() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomUnknown(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomUnknownNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Bloodedfem(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Bloodedfem = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) BloodedfemFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Bloodedfem = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetBloodedfem() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomBloodedfem(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomBloodedfemNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Gravidfem(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Gravidfem = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) GravidfemFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Gravidfem = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetGravidfem() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomGravidfem(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomGravidfemNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Larvae(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Larvae = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) LarvaeFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Larvae = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetLarvae() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomLarvae(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomLarvaeNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Poolstogen(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Poolstogen = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) PoolstogenFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Poolstogen = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetPoolstogen() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomPoolstogen(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomPoolstogenNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Processed(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Processed = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) ProcessedFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Processed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetProcessed() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomProcessed(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Globalid(val uuid.UUID) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Globalid = func() uuid.UUID { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) GlobalidFunc(f func() uuid.UUID) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetGlobalid() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Globalid = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fieldseekerSpeciesabundanceMods) RandomGlobalid(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Globalid = func() uuid.UUID {
|
|
return random_uuid_UUID(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) CreatedUser(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetCreatedUser() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomCreatedUser(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
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 fieldseekerSpeciesabundanceMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) CreatedDate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetCreatedDate() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomCreatedDate(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) LastEditedUser(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetLastEditedUser() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomLastEditedUser(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
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 fieldseekerSpeciesabundanceMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) LastEditedDate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetLastEditedDate() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomLastEditedDate(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Pupae(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Pupae = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) PupaeFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Pupae = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetPupae() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomPupae(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomPupaeNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Eggs(val null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Eggs = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) EggsFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Eggs = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetEggs() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomEggs(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomEggsNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) Females(val null.Val[int32]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Females = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) FemalesFunc(f func() null.Val[int32]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Females = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetFemales() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomFemales(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Females = 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 fieldseekerSpeciesabundanceMods) RandomFemalesNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Females = 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 fieldseekerSpeciesabundanceMods) Total(val null.Val[int32]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Total = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) TotalFunc(f func() null.Val[int32]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Total = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetTotal() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomTotal(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Total = 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 fieldseekerSpeciesabundanceMods) RandomTotalNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Total = 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 fieldseekerSpeciesabundanceMods) Creationdate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetCreationdate() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomCreationdate(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Creator(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) CreatorFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetCreator() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomCreator(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creator = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
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 fieldseekerSpeciesabundanceMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Creator = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Editdate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetEditdate() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomEditdate(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Editor(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) EditorFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetEditor() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomEditor(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
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 fieldseekerSpeciesabundanceMods) RandomEditorNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Yearweek(val null.Val[int32]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Yearweek = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) YearweekFunc(f func() null.Val[int32]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Yearweek = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetYearweek() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomYearweek(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Yearweek = 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 fieldseekerSpeciesabundanceMods) RandomYearweekNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Yearweek = 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 fieldseekerSpeciesabundanceMods) Globalzscore(val null.Val[float64]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Globalzscore = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) GlobalzscoreFunc(f func() null.Val[float64]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Globalzscore = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetGlobalzscore() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomGlobalzscore(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomGlobalzscoreNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) R7score(val null.Val[float64]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.R7score = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) R7scoreFunc(f func() null.Val[float64]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.R7score = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetR7score() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomR7score(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomR7scoreNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) R8score(val null.Val[float64]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.R8score = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) R8scoreFunc(f func() null.Val[float64]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.R8score = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetR8score() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomR8score(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomR8scoreNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) H3R7(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R7 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) H3R7Func(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R7 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetH3R7() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomH3R7(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R7 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "256")
|
|
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 fieldseekerSpeciesabundanceMods) RandomH3R7NotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R7 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "256")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) H3R8(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R8 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) H3R8Func(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R8 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetH3R8() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomH3R8(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R8 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "256")
|
|
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 fieldseekerSpeciesabundanceMods) RandomH3R8NotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.H3R8 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "256")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Geometry(val types.JSON[json.RawMessage]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geometry = func() types.JSON[json.RawMessage] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) GeometryFunc(f func() types.JSON[json.RawMessage]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geometry = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetGeometry() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geometry = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fieldseekerSpeciesabundanceMods) RandomGeometry(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geometry = func() types.JSON[json.RawMessage] {
|
|
return random_types_JSON_json_RawMessage_(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) Geospatial(val null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geospatial = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) GeospatialFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geospatial = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetGeospatial() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geospatial = 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 fieldseekerSpeciesabundanceMods) RandomGeospatial(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geospatial = 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 fieldseekerSpeciesabundanceMods) RandomGeospatialNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Geospatial = 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 fieldseekerSpeciesabundanceMods) Version(val int32) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Version = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) VersionFunc(f func() int32) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Version = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetVersion() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
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 fieldseekerSpeciesabundanceMods) RandomVersion(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.Version = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerSpeciesabundanceMods) OrganizationID(val int32) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.OrganizationID = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerSpeciesabundanceMods) OrganizationIDFunc(f func() int32) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.OrganizationID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerSpeciesabundanceMods) UnsetOrganizationID() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.OrganizationID = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fieldseekerSpeciesabundanceMods) RandomOrganizationID(f *faker.Faker) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.OrganizationID = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerSpeciesabundanceMods) WithParentsCascading() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(ctx context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
if isDone, _ := fieldseekerSpeciesabundanceWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = fieldseekerSpeciesabundanceWithParentsCascadingCtx.WithValue(ctx, true)
|
|
{
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerSpeciesabundanceMods) WithOrganization(rel *OrganizationTemplate) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(ctx context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.r.Organization = &fieldseekerSpeciesabundanceROrganizationR{
|
|
o: rel,
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerSpeciesabundanceMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(ctx context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
related := o.f.NewOrganizationWithContext(ctx, mods...)
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerSpeciesabundanceMods) WithExistingOrganization(em *models.Organization) FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(ctx context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.r.Organization = &fieldseekerSpeciesabundanceROrganizationR{
|
|
o: o.f.FromExistingOrganization(em),
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerSpeciesabundanceMods) WithoutOrganization() FieldseekerSpeciesabundanceMod {
|
|
return FieldseekerSpeciesabundanceModFunc(func(ctx context.Context, o *FieldseekerSpeciesabundanceTemplate) {
|
|
o.r.Organization = nil
|
|
})
|
|
}
|