nidus-sync/db/factory/fieldseeker.pool.bob.go
Eli Ribble 06140a9062
Remove bob submodule, add arcgis.user
I had to remove the submodule because of the go bug at
https://github.com/golang/go/issues/77196
I found the bug because of a bug in bob itself
https://github.com/stephenafamo/bob/issues/610
This was because I'm trying to save data about the Arcgis user for use
in determining if I can set up hooks to avoid the polling for data
changes.
2026-01-15 19:20:39 +00:00

2177 lines
66 KiB
Go

// Code generated by BobGen psql v0.42.1. 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 FieldseekerPoolMod interface {
Apply(context.Context, *FieldseekerPoolTemplate)
}
type FieldseekerPoolModFunc func(context.Context, *FieldseekerPoolTemplate)
func (f FieldseekerPoolModFunc) Apply(ctx context.Context, n *FieldseekerPoolTemplate) {
f(ctx, n)
}
type FieldseekerPoolModSlice []FieldseekerPoolMod
func (mods FieldseekerPoolModSlice) Apply(ctx context.Context, n *FieldseekerPoolTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// FieldseekerPoolTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type FieldseekerPoolTemplate struct {
Objectid func() int64
TrapdataID func() null.Val[uuid.UUID]
Datesent func() null.Val[time.Time]
Survtech func() null.Val[string]
Datetested func() null.Val[time.Time]
Testtech func() null.Val[string]
Comments func() null.Val[string]
Sampleid func() null.Val[string]
Processed func() null.Val[int16]
LabID func() null.Val[uuid.UUID]
Testmethod func() null.Val[string]
Diseasetested func() null.Val[string]
Diseasepos func() null.Val[string]
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]
Lab func() null.Val[string]
Poolyear func() null.Val[int16]
Gatewaysync func() null.Val[int16]
Vectorsurvcollectionid func() null.Val[string]
Vectorsurvpoolid func() null.Val[string]
Vectorsurvtrapdataid func() null.Val[string]
Creationdate func() null.Val[time.Time]
Creator func() null.Val[string]
Editdate func() null.Val[time.Time]
Editor func() null.Val[string]
Geometry func() types.JSON[json.RawMessage]
Geospatial func() null.Val[string]
Version func() int32
OrganizationID func() int32
r fieldseekerPoolR
f *Factory
alreadyPersisted bool
}
type fieldseekerPoolR struct {
Organization *fieldseekerPoolROrganizationR
}
type fieldseekerPoolROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the FieldseekerPoolTemplate
func (o *FieldseekerPoolTemplate) Apply(ctx context.Context, mods ...FieldseekerPoolMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.FieldseekerPool
// according to the relationships in the template. Nothing is inserted into the db
func (t FieldseekerPoolTemplate) setModelRels(o *models.FieldseekerPool) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.Pools = append(rel.R.Pools, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.FieldseekerPoolSetter
// this does nothing with the relationship templates
func (o FieldseekerPoolTemplate) BuildSetter() *models.FieldseekerPoolSetter {
m := &models.FieldseekerPoolSetter{}
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.Datesent != nil {
val := o.Datesent()
m.Datesent = omitnull.FromNull(val)
}
if o.Survtech != nil {
val := o.Survtech()
m.Survtech = omitnull.FromNull(val)
}
if o.Datetested != nil {
val := o.Datetested()
m.Datetested = omitnull.FromNull(val)
}
if o.Testtech != nil {
val := o.Testtech()
m.Testtech = omitnull.FromNull(val)
}
if o.Comments != nil {
val := o.Comments()
m.Comments = omitnull.FromNull(val)
}
if o.Sampleid != nil {
val := o.Sampleid()
m.Sampleid = omitnull.FromNull(val)
}
if o.Processed != nil {
val := o.Processed()
m.Processed = omitnull.FromNull(val)
}
if o.LabID != nil {
val := o.LabID()
m.LabID = omitnull.FromNull(val)
}
if o.Testmethod != nil {
val := o.Testmethod()
m.Testmethod = omitnull.FromNull(val)
}
if o.Diseasetested != nil {
val := o.Diseasetested()
m.Diseasetested = omitnull.FromNull(val)
}
if o.Diseasepos != nil {
val := o.Diseasepos()
m.Diseasepos = 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.Lab != nil {
val := o.Lab()
m.Lab = omitnull.FromNull(val)
}
if o.Poolyear != nil {
val := o.Poolyear()
m.Poolyear = omitnull.FromNull(val)
}
if o.Gatewaysync != nil {
val := o.Gatewaysync()
m.Gatewaysync = omitnull.FromNull(val)
}
if o.Vectorsurvcollectionid != nil {
val := o.Vectorsurvcollectionid()
m.Vectorsurvcollectionid = omitnull.FromNull(val)
}
if o.Vectorsurvpoolid != nil {
val := o.Vectorsurvpoolid()
m.Vectorsurvpoolid = omitnull.FromNull(val)
}
if o.Vectorsurvtrapdataid != nil {
val := o.Vectorsurvtrapdataid()
m.Vectorsurvtrapdataid = 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.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.FieldseekerPoolSetter
// this does nothing with the relationship templates
func (o FieldseekerPoolTemplate) BuildManySetter(number int) []*models.FieldseekerPoolSetter {
m := make([]*models.FieldseekerPoolSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.FieldseekerPool
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FieldseekerPoolTemplate.Create
func (o FieldseekerPoolTemplate) Build() *models.FieldseekerPool {
m := &models.FieldseekerPool{}
if o.Objectid != nil {
m.Objectid = o.Objectid()
}
if o.TrapdataID != nil {
m.TrapdataID = o.TrapdataID()
}
if o.Datesent != nil {
m.Datesent = o.Datesent()
}
if o.Survtech != nil {
m.Survtech = o.Survtech()
}
if o.Datetested != nil {
m.Datetested = o.Datetested()
}
if o.Testtech != nil {
m.Testtech = o.Testtech()
}
if o.Comments != nil {
m.Comments = o.Comments()
}
if o.Sampleid != nil {
m.Sampleid = o.Sampleid()
}
if o.Processed != nil {
m.Processed = o.Processed()
}
if o.LabID != nil {
m.LabID = o.LabID()
}
if o.Testmethod != nil {
m.Testmethod = o.Testmethod()
}
if o.Diseasetested != nil {
m.Diseasetested = o.Diseasetested()
}
if o.Diseasepos != nil {
m.Diseasepos = o.Diseasepos()
}
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.Lab != nil {
m.Lab = o.Lab()
}
if o.Poolyear != nil {
m.Poolyear = o.Poolyear()
}
if o.Gatewaysync != nil {
m.Gatewaysync = o.Gatewaysync()
}
if o.Vectorsurvcollectionid != nil {
m.Vectorsurvcollectionid = o.Vectorsurvcollectionid()
}
if o.Vectorsurvpoolid != nil {
m.Vectorsurvpoolid = o.Vectorsurvpoolid()
}
if o.Vectorsurvtrapdataid != nil {
m.Vectorsurvtrapdataid = o.Vectorsurvtrapdataid()
}
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.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.FieldseekerPoolSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FieldseekerPoolTemplate.CreateMany
func (o FieldseekerPoolTemplate) BuildMany(number int) models.FieldseekerPoolSlice {
m := make(models.FieldseekerPoolSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableFieldseekerPool(m *models.FieldseekerPoolSetter) {
if !(m.Objectid.IsValue()) {
val := random_int64(nil)
m.Objectid = omit.From(val)
}
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.FieldseekerPool
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *FieldseekerPoolTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerPool) error {
var err error
return err
}
// Create builds a fieldseekerPool and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *FieldseekerPoolTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerPool, error) {
var err error
opt := o.BuildSetter()
ensureCreatableFieldseekerPool(opt)
if o.r.Organization == nil {
FieldseekerPoolMods.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.FieldseekerPools.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 fieldseekerPool and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *FieldseekerPoolTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerPool {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a fieldseekerPool 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 *FieldseekerPoolTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerPool {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple fieldseekerPools and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o FieldseekerPoolTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerPoolSlice, error) {
var err error
m := make(models.FieldseekerPoolSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple fieldseekerPools and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o FieldseekerPoolTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerPoolSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple fieldseekerPools 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 FieldseekerPoolTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerPoolSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// FieldseekerPool has methods that act as mods for the FieldseekerPoolTemplate
var FieldseekerPoolMods fieldseekerPoolMods
type fieldseekerPoolMods struct{}
func (m fieldseekerPoolMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModSlice{
FieldseekerPoolMods.RandomObjectid(f),
FieldseekerPoolMods.RandomTrapdataID(f),
FieldseekerPoolMods.RandomDatesent(f),
FieldseekerPoolMods.RandomSurvtech(f),
FieldseekerPoolMods.RandomDatetested(f),
FieldseekerPoolMods.RandomTesttech(f),
FieldseekerPoolMods.RandomComments(f),
FieldseekerPoolMods.RandomSampleid(f),
FieldseekerPoolMods.RandomProcessed(f),
FieldseekerPoolMods.RandomLabID(f),
FieldseekerPoolMods.RandomTestmethod(f),
FieldseekerPoolMods.RandomDiseasetested(f),
FieldseekerPoolMods.RandomDiseasepos(f),
FieldseekerPoolMods.RandomGlobalid(f),
FieldseekerPoolMods.RandomCreatedUser(f),
FieldseekerPoolMods.RandomCreatedDate(f),
FieldseekerPoolMods.RandomLastEditedUser(f),
FieldseekerPoolMods.RandomLastEditedDate(f),
FieldseekerPoolMods.RandomLab(f),
FieldseekerPoolMods.RandomPoolyear(f),
FieldseekerPoolMods.RandomGatewaysync(f),
FieldseekerPoolMods.RandomVectorsurvcollectionid(f),
FieldseekerPoolMods.RandomVectorsurvpoolid(f),
FieldseekerPoolMods.RandomVectorsurvtrapdataid(f),
FieldseekerPoolMods.RandomCreationdate(f),
FieldseekerPoolMods.RandomCreator(f),
FieldseekerPoolMods.RandomEditdate(f),
FieldseekerPoolMods.RandomEditor(f),
FieldseekerPoolMods.RandomGeometry(f),
FieldseekerPoolMods.RandomGeospatial(f),
FieldseekerPoolMods.RandomVersion(f),
FieldseekerPoolMods.RandomOrganizationID(f),
}
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Objectid(val int64) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Objectid = func() int64 { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) ObjectidFunc(f func() int64) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetObjectid() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomObjectid(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Objectid = func() int64 {
return random_int64(f)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) TrapdataID(val null.Val[uuid.UUID]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.TrapdataID = func() null.Val[uuid.UUID] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) TrapdataIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.TrapdataID = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetTrapdataID() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomTrapdataID(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomTrapdataIDNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Datesent(val null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datesent = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) DatesentFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datesent = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetDatesent() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datesent = 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 fieldseekerPoolMods) RandomDatesent(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datesent = 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 fieldseekerPoolMods) RandomDatesentNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datesent = 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 fieldseekerPoolMods) Survtech(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Survtech = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) SurvtechFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Survtech = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetSurvtech() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Survtech = 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 fieldseekerPoolMods) RandomSurvtech(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Survtech = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "25")
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 fieldseekerPoolMods) RandomSurvtechNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Survtech = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "25")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Datetested(val null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datetested = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) DatetestedFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datetested = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetDatetested() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datetested = 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 fieldseekerPoolMods) RandomDatetested(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datetested = 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 fieldseekerPoolMods) RandomDatetestedNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Datetested = 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 fieldseekerPoolMods) Testtech(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testtech = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) TesttechFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testtech = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetTesttech() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testtech = 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 fieldseekerPoolMods) RandomTesttech(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testtech = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "25")
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 fieldseekerPoolMods) RandomTesttechNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testtech = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "25")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Comments(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Comments = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) CommentsFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Comments = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetComments() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Comments = 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 fieldseekerPoolMods) RandomComments(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Comments = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "250")
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 fieldseekerPoolMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Comments = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "250")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Sampleid(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Sampleid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) SampleidFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Sampleid = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetSampleid() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Sampleid = 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 fieldseekerPoolMods) RandomSampleid(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Sampleid = 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 fieldseekerPoolMods) RandomSampleidNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Sampleid = 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 fieldseekerPoolMods) Processed(val null.Val[int16]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Processed = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) ProcessedFunc(f func() null.Val[int16]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Processed = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetProcessed() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomProcessed(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) LabID(val null.Val[uuid.UUID]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LabID = func() null.Val[uuid.UUID] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) LabIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LabID = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetLabID() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LabID = 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 fieldseekerPoolMods) RandomLabID(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LabID = 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 fieldseekerPoolMods) RandomLabIDNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LabID = 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 fieldseekerPoolMods) Testmethod(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testmethod = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) TestmethodFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testmethod = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetTestmethod() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testmethod = 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 fieldseekerPoolMods) RandomTestmethod(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testmethod = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "100")
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 fieldseekerPoolMods) RandomTestmethodNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Testmethod = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "100")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Diseasetested(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasetested = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) DiseasetestedFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasetested = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetDiseasetested() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasetested = 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 fieldseekerPoolMods) RandomDiseasetested(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasetested = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "100")
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 fieldseekerPoolMods) RandomDiseasetestedNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasetested = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "100")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Diseasepos(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasepos = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) DiseaseposFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasepos = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetDiseasepos() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasepos = 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 fieldseekerPoolMods) RandomDiseasepos(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasepos = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "100")
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 fieldseekerPoolMods) RandomDiseaseposNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Diseasepos = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "100")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Globalid(val uuid.UUID) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Globalid = func() uuid.UUID { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) GlobalidFunc(f func() uuid.UUID) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetGlobalid() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomGlobalid(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Globalid = func() uuid.UUID {
return random_uuid_UUID(f)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) CreatedUser(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.CreatedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.CreatedUser = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetCreatedUser() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreatedUser(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) CreatedDate(val null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.CreatedDate = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.CreatedDate = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetCreatedDate() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreatedDate(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) LastEditedUser(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LastEditedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LastEditedUser = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetLastEditedUser() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomLastEditedUser(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) LastEditedDate(val null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LastEditedDate = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.LastEditedDate = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetLastEditedDate() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomLastEditedDate(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Lab(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Lab = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) LabFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Lab = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetLab() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Lab = 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 fieldseekerPoolMods) RandomLab(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Lab = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "25")
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 fieldseekerPoolMods) RandomLabNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Lab = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f, "25")
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Poolyear(val null.Val[int16]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Poolyear = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) PoolyearFunc(f func() null.Val[int16]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Poolyear = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetPoolyear() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Poolyear = 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 fieldseekerPoolMods) RandomPoolyear(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Poolyear = 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 fieldseekerPoolMods) RandomPoolyearNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Poolyear = 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 fieldseekerPoolMods) Gatewaysync(val null.Val[int16]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Gatewaysync = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Gatewaysync = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetGatewaysync() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Gatewaysync = 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 fieldseekerPoolMods) RandomGatewaysync(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Gatewaysync = 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 fieldseekerPoolMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Gatewaysync = 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 fieldseekerPoolMods) Vectorsurvcollectionid(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvcollectionid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) VectorsurvcollectionidFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvcollectionid = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetVectorsurvcollectionid() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) RandomVectorsurvcollectionid(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) RandomVectorsurvcollectionidNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) Vectorsurvpoolid(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvpoolid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) VectorsurvpoolidFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvpoolid = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetVectorsurvpoolid() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvpoolid = 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 fieldseekerPoolMods) RandomVectorsurvpoolid(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvpoolid = 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 fieldseekerPoolMods) RandomVectorsurvpoolidNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvpoolid = 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 fieldseekerPoolMods) Vectorsurvtrapdataid(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvtrapdataid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) VectorsurvtrapdataidFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvtrapdataid = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetVectorsurvtrapdataid() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) RandomVectorsurvtrapdataid(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) RandomVectorsurvtrapdataidNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) Creationdate(val null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Creationdate = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetCreationdate() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreationdate(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Creator(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) CreatorFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetCreator() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreator(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Editdate(val null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Editdate = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetEditdate() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomEditdate(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Editor(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) EditorFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetEditor() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomEditor(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomEditorNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Geometry(val types.JSON[json.RawMessage]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Geometry = func() types.JSON[json.RawMessage] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) GeometryFunc(f func() types.JSON[json.RawMessage]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Geometry = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetGeometry() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomGeometry(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Geometry = func() types.JSON[json.RawMessage] {
return random_types_JSON_json_RawMessage_(f)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) Geospatial(val null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Geospatial = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) GeospatialFunc(f func() null.Val[string]) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Geospatial = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetGeospatial() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomGeospatial(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomGeospatialNotNull(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) Version(val int32) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Version = func() int32 { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) VersionFunc(f func() int32) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Version = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetVersion() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomVersion(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.Version = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fieldseekerPoolMods) OrganizationID(val int32) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m fieldseekerPoolMods) OrganizationIDFunc(f func() int32) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m fieldseekerPoolMods) UnsetOrganizationID() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
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 fieldseekerPoolMods) RandomOrganizationID(f *faker.Faker) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
func (m fieldseekerPoolMods) WithParentsCascading() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) {
if isDone, _ := fieldseekerPoolWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = fieldseekerPoolWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m fieldseekerPoolMods) WithOrganization(rel *OrganizationTemplate) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) {
o.r.Organization = &fieldseekerPoolROrganizationR{
o: rel,
}
})
}
func (m fieldseekerPoolMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m fieldseekerPoolMods) WithExistingOrganization(em *models.Organization) FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) {
o.r.Organization = &fieldseekerPoolROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m fieldseekerPoolMods) WithoutOrganization() FieldseekerPoolMod {
return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) {
o.r.Organization = nil
})
}