Move to latest bobgen, add fieldseeker schema references
This is an intermediate step between shifting from the old fs_* prefixed table names to an entire fieldseeker schema. At this point we have both, and we aren't doing much with the new schema but compiling.
This commit is contained in:
parent
683c5134df
commit
7c4fb02908
452 changed files with 119980 additions and 879 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -32,6 +32,7 @@ func (j joinSet[Q]) AliasedAs(alias string) joinSet[Q] {
|
|||
}
|
||||
|
||||
type joins[Q dialect.Joinable] struct {
|
||||
FieldseekerRodentlocations joinSet[fieldseekerRodentlocationJoins[Q]]
|
||||
FieldseekerSyncs joinSet[fieldseekerSyncJoins[Q]]
|
||||
FSContainerrelates joinSet[fsContainerrelateJoins[Q]]
|
||||
FSFieldscoutinglogs joinSet[fsFieldscoutinglogJoins[Q]]
|
||||
|
|
@ -104,6 +105,7 @@ func buildJoinSet[Q interface{ aliasedAs(string) Q }, C any, F func(C, string) Q
|
|||
|
||||
func getJoins[Q dialect.Joinable]() joins[Q] {
|
||||
return joins[Q]{
|
||||
FieldseekerRodentlocations: buildJoinSet[fieldseekerRodentlocationJoins[Q]](FieldseekerRodentlocations.Columns, buildFieldseekerRodentlocationJoins),
|
||||
FieldseekerSyncs: buildJoinSet[fieldseekerSyncJoins[Q]](FieldseekerSyncs.Columns, buildFieldseekerSyncJoins),
|
||||
FSContainerrelates: buildJoinSet[fsContainerrelateJoins[Q]](FSContainerrelates.Columns, buildFSContainerrelateJoins),
|
||||
FSFieldscoutinglogs: buildJoinSet[fsFieldscoutinglogJoins[Q]](FSFieldscoutinglogs.Columns, buildFSFieldscoutinglogJoins),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -17,6 +17,7 @@ import (
|
|||
var Preload = getPreloaders()
|
||||
|
||||
type preloaders struct {
|
||||
FieldseekerRodentlocation fieldseekerRodentlocationPreloader
|
||||
FieldseekerSync fieldseekerSyncPreloader
|
||||
FSContainerrelate fsContainerrelatePreloader
|
||||
FSFieldscoutinglog fsFieldscoutinglogPreloader
|
||||
|
|
@ -81,6 +82,7 @@ type preloaders struct {
|
|||
|
||||
func getPreloaders() preloaders {
|
||||
return preloaders{
|
||||
FieldseekerRodentlocation: buildFieldseekerRodentlocationPreloader(),
|
||||
FieldseekerSync: buildFieldseekerSyncPreloader(),
|
||||
FSContainerrelate: buildFSContainerrelatePreloader(),
|
||||
FSFieldscoutinglog: buildFSFieldscoutinglogPreloader(),
|
||||
|
|
@ -151,6 +153,7 @@ var (
|
|||
)
|
||||
|
||||
type thenLoaders[Q orm.Loadable] struct {
|
||||
FieldseekerRodentlocation fieldseekerRodentlocationThenLoader[Q]
|
||||
FieldseekerSync fieldseekerSyncThenLoader[Q]
|
||||
FSContainerrelate fsContainerrelateThenLoader[Q]
|
||||
FSFieldscoutinglog fsFieldscoutinglogThenLoader[Q]
|
||||
|
|
@ -215,6 +218,7 @@ type thenLoaders[Q orm.Loadable] struct {
|
|||
|
||||
func getThenLoaders[Q orm.Loadable]() thenLoaders[Q] {
|
||||
return thenLoaders[Q]{
|
||||
FieldseekerRodentlocation: buildFieldseekerRodentlocationThenLoader[Q](),
|
||||
FieldseekerSync: buildFieldseekerSyncThenLoader[Q](),
|
||||
FSContainerrelate: buildFSContainerrelateThenLoader[Q](),
|
||||
FSFieldscoutinglog: buildFSFieldscoutinglogThenLoader[Q](),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/lib/pq"
|
||||
"github.com/stephenafamo/bob"
|
||||
)
|
||||
|
|
@ -15,6 +16,126 @@ import (
|
|||
// Set the testDB to enable tests that use the database
|
||||
var testDB bob.Transactor[bob.Tx]
|
||||
|
||||
// Make sure the type FieldseekerAerialsprayline runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerAerialsprayline{}
|
||||
|
||||
// Make sure the type FieldseekerAerialspraysession runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerAerialspraysession{}
|
||||
|
||||
// Make sure the type FieldseekerBarrierspray runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerBarrierspray{}
|
||||
|
||||
// Make sure the type FieldseekerBarriersprayroute runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerBarriersprayroute{}
|
||||
|
||||
// Make sure the type FieldseekerContainerrelate runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerContainerrelate{}
|
||||
|
||||
// Make sure the type FieldseekerFieldscoutinglog runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerFieldscoutinglog{}
|
||||
|
||||
// Make sure the type FieldseekerHabitatrelate runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerHabitatrelate{}
|
||||
|
||||
// Make sure the type FieldseekerInspectionsample runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerInspectionsample{}
|
||||
|
||||
// Make sure the type FieldseekerInspectionsampledetail runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerInspectionsampledetail{}
|
||||
|
||||
// Make sure the type FieldseekerLandingcount runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerLandingcount{}
|
||||
|
||||
// Make sure the type FieldseekerLandingcountlocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerLandingcountlocation{}
|
||||
|
||||
// Make sure the type FieldseekerLinelocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerLinelocation{}
|
||||
|
||||
// Make sure the type FieldseekerLocationtracking runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerLocationtracking{}
|
||||
|
||||
// Make sure the type FieldseekerMosquitoinspection runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerMosquitoinspection{}
|
||||
|
||||
// Make sure the type FieldseekerPointlocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerPointlocation{}
|
||||
|
||||
// Make sure the type FieldseekerPolygonlocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerPolygonlocation{}
|
||||
|
||||
// Make sure the type FieldseekerPool runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerPool{}
|
||||
|
||||
// Make sure the type FieldseekerPoolbuffer runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerPoolbuffer{}
|
||||
|
||||
// Make sure the type FieldseekerPooldetail runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerPooldetail{}
|
||||
|
||||
// Make sure the type FieldseekerProposedtreatmentarea runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerProposedtreatmentarea{}
|
||||
|
||||
// Make sure the type FieldseekerQalarvcount runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerQalarvcount{}
|
||||
|
||||
// Make sure the type FieldseekerQamosquitoinspection runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerQamosquitoinspection{}
|
||||
|
||||
// Make sure the type FieldseekerQaproductobservation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerQaproductobservation{}
|
||||
|
||||
// Make sure the type FieldseekerRestrictedarea runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerRestrictedarea{}
|
||||
|
||||
// Make sure the type FieldseekerRodentinspection runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerRodentinspection{}
|
||||
|
||||
// Make sure the type FieldseekerRodentlocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerRodentlocation{}
|
||||
|
||||
// Make sure the type FieldseekerSamplecollection runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerSamplecollection{}
|
||||
|
||||
// Make sure the type FieldseekerSamplelocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerSamplelocation{}
|
||||
|
||||
// Make sure the type FieldseekerServicerequest runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerServicerequest{}
|
||||
|
||||
// Make sure the type FieldseekerSpeciesabundance runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerSpeciesabundance{}
|
||||
|
||||
// Make sure the type FieldseekerStormdrain runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerStormdrain{}
|
||||
|
||||
// Make sure the type FieldseekerTimecard runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerTimecard{}
|
||||
|
||||
// Make sure the type FieldseekerTracklog runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerTracklog{}
|
||||
|
||||
// Make sure the type FieldseekerTrapdatum runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerTrapdatum{}
|
||||
|
||||
// Make sure the type FieldseekerTraplocation runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerTraplocation{}
|
||||
|
||||
// Make sure the type FieldseekerTreatment runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerTreatment{}
|
||||
|
||||
// Make sure the type FieldseekerTreatmentarea runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerTreatmentarea{}
|
||||
|
||||
// Make sure the type FieldseekerUlvsprayroute runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerUlvsprayroute{}
|
||||
|
||||
// Make sure the type FieldseekerZone runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerZone{}
|
||||
|
||||
// Make sure the type FieldseekerZones2 runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerZones2{}
|
||||
|
||||
// Make sure the type FieldseekerSync runs hooks after queries
|
||||
var _ bob.HookableType = &FieldseekerSync{}
|
||||
|
||||
|
|
@ -216,6 +337,732 @@ var _ bob.HookableType = &SpatialRefSy{}
|
|||
// Make sure the type User runs hooks after queries
|
||||
var _ bob.HookableType = &User{}
|
||||
|
||||
// Make sure the type uuid.UUID satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*uuid.UUID)(nil)
|
||||
|
||||
// Make sure the type uuid.UUID satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(uuid.UUID)
|
||||
|
||||
// Make sure the type enums.FieldseekerContainerrelateMosquitocontainertypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerContainerrelateMosquitocontainertypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerContainerrelateMosquitocontainertypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerContainerrelateMosquitocontainertypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampleNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerInspectionsampleNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampleNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerInspectionsampleNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLocationpriorityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerLinelocationLocationpriorityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLocationpriorityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerLinelocationLocationpriorityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerLinelocationNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerLinelocationNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLocationsymbologyEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerLinelocationLocationsymbologyEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLocationsymbologyEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerLinelocationLocationsymbologyEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoactivityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoactivityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoactivityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoactivityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitobreedingEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitobreedingEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitobreedingEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitobreedingEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationLocationpriorityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationLocationpriorityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationLocationpriorityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationLocationpriorityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationLocationsymbologyEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationLocationsymbologyEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationLocationsymbologyEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationLocationsymbologyEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationLocationpriorityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPolygonlocationLocationpriorityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationLocationpriorityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationLocationpriorityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPolygonlocationNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationLocationsymbologyEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPolygonlocationLocationsymbologyEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationLocationsymbologyEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationLocationsymbologyEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPoolNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPoolNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolMosquitolabnameEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerPoolMosquitolabnameEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerPoolMosquitolabnameEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerPoolMosquitolabnameEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerProposedtreatmentareaNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerProposedtreatmentareaNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerProposedtreatmentareaNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerProposedtreatmentareaNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerProposedtreatmentareaLocationpriorityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerProposedtreatmentareaLocationpriorityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerProposedtreatmentareaLocationpriorityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerProposedtreatmentareaLocationpriorityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionMosquitoactionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionMosquitoactionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionMosquitoactionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionMosquitoactionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQasitetypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQasitetypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQasitetypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQasitetypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQavegetationEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQavegetationEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQavegetationEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQavegetationEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQasourcereductionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQasourcereductionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQasourcereductionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQasourcereductionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawatermovementEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawatermovementEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawatermovementEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawatermovementEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQasoilconditionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQasoilconditionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQasoilconditionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQasoilconditionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterdurationEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawaterdurationEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterdurationEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawaterdurationEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawatersourceEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawatersourceEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawatersourceEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawatersourceEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationRodentlocationhabitatEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerRodentlocationRodentlocationhabitatEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationRodentlocationhabitatEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerRodentlocationRodentlocationhabitatEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationLocationpriority1Enum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerRodentlocationLocationpriority1Enum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationLocationpriority1Enum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerRodentlocationLocationpriority1Enum)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationLocationusetype1Enum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerRodentlocationLocationusetype1Enum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationLocationusetype1Enum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerRodentlocationLocationusetype1Enum)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationNotinuitF1Enum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerRodentlocationNotinuitF1Enum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationNotinuitF1Enum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerRodentlocationNotinuitF1Enum)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationRodentlocationSymbologyEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerRodentlocationRodentlocationSymbologyEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerRodentlocationRodentlocationSymbologyEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerRodentlocationRodentlocationSymbologyEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitositeconditionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitositeconditionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitositeconditionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitositeconditionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitosampletypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitosampletypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitosampletypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitosampletypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitosampleconditionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitosampleconditionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitosampleconditionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitosampleconditionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionNotinuisexEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionNotinuisexEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionNotinuisexEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionNotinuisexEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitoactivityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitoactivityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitoactivityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitoactivityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitotestmethodEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitotestmethodEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitotestmethodEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitotestmethodEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitodiseaseEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitodiseaseEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitodiseaseEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitodiseaseEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitolabnameEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitolabnameEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplecollectionMosquitolabnameEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitolabnameEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationLocationhabitattypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplelocationLocationhabitattypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationLocationhabitattypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplelocationLocationhabitattypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationLocationpriorityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplelocationLocationpriorityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationLocationpriorityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplelocationLocationpriorityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationSamplelocationusetypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplelocationSamplelocationusetypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationSamplelocationusetypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplelocationSamplelocationusetypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSamplelocationNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSamplelocationNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSamplelocationNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestsourceEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestsourceEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestsourceEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestsourceEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestpriorityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestpriorityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestpriorityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestpriorityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequeststatusEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequeststatusEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequeststatusEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequeststatusEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestregionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestregionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestregionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestregionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequesttargetEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequesttargetEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequesttargetEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequesttargetEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestrejectedreasonEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestrejectedreasonEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestrejectedreasonEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestrejectedreasonEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestnextactionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestnextactionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestnextactionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestnextactionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestissuesEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestissuesEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerServicerequestServicerequestissuesEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestissuesEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerSpeciesabundanceNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerSpeciesabundanceNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerSpeciesabundanceNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerSpeciesabundanceNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerStormdrainStormdrainsymbologyEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerStormdrainStormdrainsymbologyEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerStormdrainStormdrainsymbologyEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerStormdrainStormdrainsymbologyEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu)
|
||||
|
||||
// Make sure the type enums.FieldseekerTimecardTimecardequipmenttypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTimecardTimecardequipmenttypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTimecardTimecardequipmenttypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTimecardTimecardequipmenttypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataMosquitotraptypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataMosquitotraptypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataMosquitotraptypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataMosquitotraptypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataMosquitositeconditionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataMosquitositeconditionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataMosquitositeconditionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataMosquitositeconditionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataMosquitotrapconditionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataMosquitotrapconditionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataMosquitotrapconditionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataMosquitotrapconditionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTraplocationNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTraplocationNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentMosquitoactivityEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentMosquitoactivityEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentMosquitoactivityEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentMosquitoactivityEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentMosquitoproductareaunitEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentMosquitoproductareaunitEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentMosquitoproductareaunitEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentMosquitoproductareaunitEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentNotinuiwinddirectionEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentNotinuiwinddirectionEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentNotinuiwinddirectionEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentNotinuiwinddirectionEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentNotinuitFEnum satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentNotinuitFEnum)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentNotinuitFEnum satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentNotinuitFEnum)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1 satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1 satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E)(nil)
|
||||
|
||||
// Make sure the type enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E satisfies database/sql/driver.Valuer
|
||||
var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E)
|
||||
|
||||
// Make sure the type enums.H3aggregationtype satisfies database/sql.Scanner
|
||||
var _ sql.Scanner = (*enums.H3aggregationtype)(nil)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -17,209 +17,329 @@ var (
|
|||
)
|
||||
|
||||
func Where[Q psql.Filterable]() struct {
|
||||
FieldseekerSyncs fieldseekerSyncWhere[Q]
|
||||
FSContainerrelates fsContainerrelateWhere[Q]
|
||||
FSFieldscoutinglogs fsFieldscoutinglogWhere[Q]
|
||||
FSHabitatrelates fsHabitatrelateWhere[Q]
|
||||
FSInspectionsamples fsInspectionsampleWhere[Q]
|
||||
FSInspectionsampledetails fsInspectionsampledetailWhere[Q]
|
||||
FSLinelocations fsLinelocationWhere[Q]
|
||||
FSLocationtrackings fsLocationtrackingWhere[Q]
|
||||
FSMosquitoinspections fsMosquitoinspectionWhere[Q]
|
||||
FSPointlocations fsPointlocationWhere[Q]
|
||||
FSPolygonlocations fsPolygonlocationWhere[Q]
|
||||
FSPools fsPoolWhere[Q]
|
||||
FSPooldetails fsPooldetailWhere[Q]
|
||||
FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q]
|
||||
FSQamosquitoinspections fsQamosquitoinspectionWhere[Q]
|
||||
FSRodentlocations fsRodentlocationWhere[Q]
|
||||
FSSamplecollections fsSamplecollectionWhere[Q]
|
||||
FSSamplelocations fsSamplelocationWhere[Q]
|
||||
FSServicerequests fsServicerequestWhere[Q]
|
||||
FSSpeciesabundances fsSpeciesabundanceWhere[Q]
|
||||
FSStormdrains fsStormdrainWhere[Q]
|
||||
FSTimecards fsTimecardWhere[Q]
|
||||
FSTrapdata fsTrapdatumWhere[Q]
|
||||
FSTraplocations fsTraplocationWhere[Q]
|
||||
FSTreatments fsTreatmentWhere[Q]
|
||||
FSTreatmentareas fsTreatmentareaWhere[Q]
|
||||
FSZones fsZoneWhere[Q]
|
||||
FSZones2s fsZones2Where[Q]
|
||||
GeographyColumns geographyColumnWhere[Q]
|
||||
GeometryColumns geometryColumnWhere[Q]
|
||||
GooseDBVersions gooseDBVersionWhere[Q]
|
||||
H3Aggregations h3AggregationWhere[Q]
|
||||
HistoryContainerrelates historyContainerrelateWhere[Q]
|
||||
HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q]
|
||||
HistoryHabitatrelates historyHabitatrelateWhere[Q]
|
||||
HistoryInspectionsamples historyInspectionsampleWhere[Q]
|
||||
HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q]
|
||||
HistoryLinelocations historyLinelocationWhere[Q]
|
||||
HistoryLocationtrackings historyLocationtrackingWhere[Q]
|
||||
HistoryMosquitoinspections historyMosquitoinspectionWhere[Q]
|
||||
HistoryPointlocations historyPointlocationWhere[Q]
|
||||
HistoryPolygonlocations historyPolygonlocationWhere[Q]
|
||||
HistoryPools historyPoolWhere[Q]
|
||||
HistoryPooldetails historyPooldetailWhere[Q]
|
||||
HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q]
|
||||
HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q]
|
||||
HistoryRodentlocations historyRodentlocationWhere[Q]
|
||||
HistorySamplecollections historySamplecollectionWhere[Q]
|
||||
HistorySamplelocations historySamplelocationWhere[Q]
|
||||
HistoryServicerequests historyServicerequestWhere[Q]
|
||||
HistorySpeciesabundances historySpeciesabundanceWhere[Q]
|
||||
HistoryStormdrains historyStormdrainWhere[Q]
|
||||
HistoryTimecards historyTimecardWhere[Q]
|
||||
HistoryTrapdata historyTrapdatumWhere[Q]
|
||||
HistoryTraplocations historyTraplocationWhere[Q]
|
||||
HistoryTreatments historyTreatmentWhere[Q]
|
||||
HistoryTreatmentareas historyTreatmentareaWhere[Q]
|
||||
HistoryZones historyZoneWhere[Q]
|
||||
HistoryZones2s historyZones2Where[Q]
|
||||
Notifications notificationWhere[Q]
|
||||
OauthTokens oauthTokenWhere[Q]
|
||||
Organizations organizationWhere[Q]
|
||||
RasterColumns rasterColumnWhere[Q]
|
||||
RasterOverviews rasterOverviewWhere[Q]
|
||||
Sessions sessionWhere[Q]
|
||||
SpatialRefSys spatialRefSyWhere[Q]
|
||||
Users userWhere[Q]
|
||||
FieldseekerAerialspraylines fieldseekerAerialspraylineWhere[Q]
|
||||
FieldseekerAerialspraysessions fieldseekerAerialspraysessionWhere[Q]
|
||||
FieldseekerBarriersprays fieldseekerBarriersprayWhere[Q]
|
||||
FieldseekerBarriersprayroutes fieldseekerBarriersprayrouteWhere[Q]
|
||||
FieldseekerContainerrelates fieldseekerContainerrelateWhere[Q]
|
||||
FieldseekerFieldscoutinglogs fieldseekerFieldscoutinglogWhere[Q]
|
||||
FieldseekerHabitatrelates fieldseekerHabitatrelateWhere[Q]
|
||||
FieldseekerInspectionsamples fieldseekerInspectionsampleWhere[Q]
|
||||
FieldseekerInspectionsampledetails fieldseekerInspectionsampledetailWhere[Q]
|
||||
FieldseekerLandingcounts fieldseekerLandingcountWhere[Q]
|
||||
FieldseekerLandingcountlocations fieldseekerLandingcountlocationWhere[Q]
|
||||
FieldseekerLinelocations fieldseekerLinelocationWhere[Q]
|
||||
FieldseekerLocationtrackings fieldseekerLocationtrackingWhere[Q]
|
||||
FieldseekerMosquitoinspections fieldseekerMosquitoinspectionWhere[Q]
|
||||
FieldseekerPointlocations fieldseekerPointlocationWhere[Q]
|
||||
FieldseekerPolygonlocations fieldseekerPolygonlocationWhere[Q]
|
||||
FieldseekerPools fieldseekerPoolWhere[Q]
|
||||
FieldseekerPoolbuffers fieldseekerPoolbufferWhere[Q]
|
||||
FieldseekerPooldetails fieldseekerPooldetailWhere[Q]
|
||||
FieldseekerProposedtreatmentareas fieldseekerProposedtreatmentareaWhere[Q]
|
||||
FieldseekerQalarvcounts fieldseekerQalarvcountWhere[Q]
|
||||
FieldseekerQamosquitoinspections fieldseekerQamosquitoinspectionWhere[Q]
|
||||
FieldseekerQaproductobservations fieldseekerQaproductobservationWhere[Q]
|
||||
FieldseekerRestrictedareas fieldseekerRestrictedareaWhere[Q]
|
||||
FieldseekerRodentinspections fieldseekerRodentinspectionWhere[Q]
|
||||
FieldseekerRodentlocations fieldseekerRodentlocationWhere[Q]
|
||||
FieldseekerSamplecollections fieldseekerSamplecollectionWhere[Q]
|
||||
FieldseekerSamplelocations fieldseekerSamplelocationWhere[Q]
|
||||
FieldseekerServicerequests fieldseekerServicerequestWhere[Q]
|
||||
FieldseekerSpeciesabundances fieldseekerSpeciesabundanceWhere[Q]
|
||||
FieldseekerStormdrains fieldseekerStormdrainWhere[Q]
|
||||
FieldseekerTimecards fieldseekerTimecardWhere[Q]
|
||||
FieldseekerTracklogs fieldseekerTracklogWhere[Q]
|
||||
FieldseekerTrapdata fieldseekerTrapdatumWhere[Q]
|
||||
FieldseekerTraplocations fieldseekerTraplocationWhere[Q]
|
||||
FieldseekerTreatments fieldseekerTreatmentWhere[Q]
|
||||
FieldseekerTreatmentareas fieldseekerTreatmentareaWhere[Q]
|
||||
FieldseekerUlvsprayroutes fieldseekerUlvsprayrouteWhere[Q]
|
||||
FieldseekerZones fieldseekerZoneWhere[Q]
|
||||
FieldseekerZones2s fieldseekerZones2Where[Q]
|
||||
FieldseekerSyncs fieldseekerSyncWhere[Q]
|
||||
FSContainerrelates fsContainerrelateWhere[Q]
|
||||
FSFieldscoutinglogs fsFieldscoutinglogWhere[Q]
|
||||
FSHabitatrelates fsHabitatrelateWhere[Q]
|
||||
FSInspectionsamples fsInspectionsampleWhere[Q]
|
||||
FSInspectionsampledetails fsInspectionsampledetailWhere[Q]
|
||||
FSLinelocations fsLinelocationWhere[Q]
|
||||
FSLocationtrackings fsLocationtrackingWhere[Q]
|
||||
FSMosquitoinspections fsMosquitoinspectionWhere[Q]
|
||||
FSPointlocations fsPointlocationWhere[Q]
|
||||
FSPolygonlocations fsPolygonlocationWhere[Q]
|
||||
FSPools fsPoolWhere[Q]
|
||||
FSPooldetails fsPooldetailWhere[Q]
|
||||
FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q]
|
||||
FSQamosquitoinspections fsQamosquitoinspectionWhere[Q]
|
||||
FSRodentlocations fsRodentlocationWhere[Q]
|
||||
FSSamplecollections fsSamplecollectionWhere[Q]
|
||||
FSSamplelocations fsSamplelocationWhere[Q]
|
||||
FSServicerequests fsServicerequestWhere[Q]
|
||||
FSSpeciesabundances fsSpeciesabundanceWhere[Q]
|
||||
FSStormdrains fsStormdrainWhere[Q]
|
||||
FSTimecards fsTimecardWhere[Q]
|
||||
FSTrapdata fsTrapdatumWhere[Q]
|
||||
FSTraplocations fsTraplocationWhere[Q]
|
||||
FSTreatments fsTreatmentWhere[Q]
|
||||
FSTreatmentareas fsTreatmentareaWhere[Q]
|
||||
FSZones fsZoneWhere[Q]
|
||||
FSZones2s fsZones2Where[Q]
|
||||
GeographyColumns geographyColumnWhere[Q]
|
||||
GeometryColumns geometryColumnWhere[Q]
|
||||
GooseDBVersions gooseDBVersionWhere[Q]
|
||||
H3Aggregations h3AggregationWhere[Q]
|
||||
HistoryContainerrelates historyContainerrelateWhere[Q]
|
||||
HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q]
|
||||
HistoryHabitatrelates historyHabitatrelateWhere[Q]
|
||||
HistoryInspectionsamples historyInspectionsampleWhere[Q]
|
||||
HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q]
|
||||
HistoryLinelocations historyLinelocationWhere[Q]
|
||||
HistoryLocationtrackings historyLocationtrackingWhere[Q]
|
||||
HistoryMosquitoinspections historyMosquitoinspectionWhere[Q]
|
||||
HistoryPointlocations historyPointlocationWhere[Q]
|
||||
HistoryPolygonlocations historyPolygonlocationWhere[Q]
|
||||
HistoryPools historyPoolWhere[Q]
|
||||
HistoryPooldetails historyPooldetailWhere[Q]
|
||||
HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q]
|
||||
HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q]
|
||||
HistoryRodentlocations historyRodentlocationWhere[Q]
|
||||
HistorySamplecollections historySamplecollectionWhere[Q]
|
||||
HistorySamplelocations historySamplelocationWhere[Q]
|
||||
HistoryServicerequests historyServicerequestWhere[Q]
|
||||
HistorySpeciesabundances historySpeciesabundanceWhere[Q]
|
||||
HistoryStormdrains historyStormdrainWhere[Q]
|
||||
HistoryTimecards historyTimecardWhere[Q]
|
||||
HistoryTrapdata historyTrapdatumWhere[Q]
|
||||
HistoryTraplocations historyTraplocationWhere[Q]
|
||||
HistoryTreatments historyTreatmentWhere[Q]
|
||||
HistoryTreatmentareas historyTreatmentareaWhere[Q]
|
||||
HistoryZones historyZoneWhere[Q]
|
||||
HistoryZones2s historyZones2Where[Q]
|
||||
Notifications notificationWhere[Q]
|
||||
OauthTokens oauthTokenWhere[Q]
|
||||
Organizations organizationWhere[Q]
|
||||
RasterColumns rasterColumnWhere[Q]
|
||||
RasterOverviews rasterOverviewWhere[Q]
|
||||
Sessions sessionWhere[Q]
|
||||
SpatialRefSys spatialRefSyWhere[Q]
|
||||
Users userWhere[Q]
|
||||
} {
|
||||
return struct {
|
||||
FieldseekerSyncs fieldseekerSyncWhere[Q]
|
||||
FSContainerrelates fsContainerrelateWhere[Q]
|
||||
FSFieldscoutinglogs fsFieldscoutinglogWhere[Q]
|
||||
FSHabitatrelates fsHabitatrelateWhere[Q]
|
||||
FSInspectionsamples fsInspectionsampleWhere[Q]
|
||||
FSInspectionsampledetails fsInspectionsampledetailWhere[Q]
|
||||
FSLinelocations fsLinelocationWhere[Q]
|
||||
FSLocationtrackings fsLocationtrackingWhere[Q]
|
||||
FSMosquitoinspections fsMosquitoinspectionWhere[Q]
|
||||
FSPointlocations fsPointlocationWhere[Q]
|
||||
FSPolygonlocations fsPolygonlocationWhere[Q]
|
||||
FSPools fsPoolWhere[Q]
|
||||
FSPooldetails fsPooldetailWhere[Q]
|
||||
FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q]
|
||||
FSQamosquitoinspections fsQamosquitoinspectionWhere[Q]
|
||||
FSRodentlocations fsRodentlocationWhere[Q]
|
||||
FSSamplecollections fsSamplecollectionWhere[Q]
|
||||
FSSamplelocations fsSamplelocationWhere[Q]
|
||||
FSServicerequests fsServicerequestWhere[Q]
|
||||
FSSpeciesabundances fsSpeciesabundanceWhere[Q]
|
||||
FSStormdrains fsStormdrainWhere[Q]
|
||||
FSTimecards fsTimecardWhere[Q]
|
||||
FSTrapdata fsTrapdatumWhere[Q]
|
||||
FSTraplocations fsTraplocationWhere[Q]
|
||||
FSTreatments fsTreatmentWhere[Q]
|
||||
FSTreatmentareas fsTreatmentareaWhere[Q]
|
||||
FSZones fsZoneWhere[Q]
|
||||
FSZones2s fsZones2Where[Q]
|
||||
GeographyColumns geographyColumnWhere[Q]
|
||||
GeometryColumns geometryColumnWhere[Q]
|
||||
GooseDBVersions gooseDBVersionWhere[Q]
|
||||
H3Aggregations h3AggregationWhere[Q]
|
||||
HistoryContainerrelates historyContainerrelateWhere[Q]
|
||||
HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q]
|
||||
HistoryHabitatrelates historyHabitatrelateWhere[Q]
|
||||
HistoryInspectionsamples historyInspectionsampleWhere[Q]
|
||||
HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q]
|
||||
HistoryLinelocations historyLinelocationWhere[Q]
|
||||
HistoryLocationtrackings historyLocationtrackingWhere[Q]
|
||||
HistoryMosquitoinspections historyMosquitoinspectionWhere[Q]
|
||||
HistoryPointlocations historyPointlocationWhere[Q]
|
||||
HistoryPolygonlocations historyPolygonlocationWhere[Q]
|
||||
HistoryPools historyPoolWhere[Q]
|
||||
HistoryPooldetails historyPooldetailWhere[Q]
|
||||
HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q]
|
||||
HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q]
|
||||
HistoryRodentlocations historyRodentlocationWhere[Q]
|
||||
HistorySamplecollections historySamplecollectionWhere[Q]
|
||||
HistorySamplelocations historySamplelocationWhere[Q]
|
||||
HistoryServicerequests historyServicerequestWhere[Q]
|
||||
HistorySpeciesabundances historySpeciesabundanceWhere[Q]
|
||||
HistoryStormdrains historyStormdrainWhere[Q]
|
||||
HistoryTimecards historyTimecardWhere[Q]
|
||||
HistoryTrapdata historyTrapdatumWhere[Q]
|
||||
HistoryTraplocations historyTraplocationWhere[Q]
|
||||
HistoryTreatments historyTreatmentWhere[Q]
|
||||
HistoryTreatmentareas historyTreatmentareaWhere[Q]
|
||||
HistoryZones historyZoneWhere[Q]
|
||||
HistoryZones2s historyZones2Where[Q]
|
||||
Notifications notificationWhere[Q]
|
||||
OauthTokens oauthTokenWhere[Q]
|
||||
Organizations organizationWhere[Q]
|
||||
RasterColumns rasterColumnWhere[Q]
|
||||
RasterOverviews rasterOverviewWhere[Q]
|
||||
Sessions sessionWhere[Q]
|
||||
SpatialRefSys spatialRefSyWhere[Q]
|
||||
Users userWhere[Q]
|
||||
FieldseekerAerialspraylines fieldseekerAerialspraylineWhere[Q]
|
||||
FieldseekerAerialspraysessions fieldseekerAerialspraysessionWhere[Q]
|
||||
FieldseekerBarriersprays fieldseekerBarriersprayWhere[Q]
|
||||
FieldseekerBarriersprayroutes fieldseekerBarriersprayrouteWhere[Q]
|
||||
FieldseekerContainerrelates fieldseekerContainerrelateWhere[Q]
|
||||
FieldseekerFieldscoutinglogs fieldseekerFieldscoutinglogWhere[Q]
|
||||
FieldseekerHabitatrelates fieldseekerHabitatrelateWhere[Q]
|
||||
FieldseekerInspectionsamples fieldseekerInspectionsampleWhere[Q]
|
||||
FieldseekerInspectionsampledetails fieldseekerInspectionsampledetailWhere[Q]
|
||||
FieldseekerLandingcounts fieldseekerLandingcountWhere[Q]
|
||||
FieldseekerLandingcountlocations fieldseekerLandingcountlocationWhere[Q]
|
||||
FieldseekerLinelocations fieldseekerLinelocationWhere[Q]
|
||||
FieldseekerLocationtrackings fieldseekerLocationtrackingWhere[Q]
|
||||
FieldseekerMosquitoinspections fieldseekerMosquitoinspectionWhere[Q]
|
||||
FieldseekerPointlocations fieldseekerPointlocationWhere[Q]
|
||||
FieldseekerPolygonlocations fieldseekerPolygonlocationWhere[Q]
|
||||
FieldseekerPools fieldseekerPoolWhere[Q]
|
||||
FieldseekerPoolbuffers fieldseekerPoolbufferWhere[Q]
|
||||
FieldseekerPooldetails fieldseekerPooldetailWhere[Q]
|
||||
FieldseekerProposedtreatmentareas fieldseekerProposedtreatmentareaWhere[Q]
|
||||
FieldseekerQalarvcounts fieldseekerQalarvcountWhere[Q]
|
||||
FieldseekerQamosquitoinspections fieldseekerQamosquitoinspectionWhere[Q]
|
||||
FieldseekerQaproductobservations fieldseekerQaproductobservationWhere[Q]
|
||||
FieldseekerRestrictedareas fieldseekerRestrictedareaWhere[Q]
|
||||
FieldseekerRodentinspections fieldseekerRodentinspectionWhere[Q]
|
||||
FieldseekerRodentlocations fieldseekerRodentlocationWhere[Q]
|
||||
FieldseekerSamplecollections fieldseekerSamplecollectionWhere[Q]
|
||||
FieldseekerSamplelocations fieldseekerSamplelocationWhere[Q]
|
||||
FieldseekerServicerequests fieldseekerServicerequestWhere[Q]
|
||||
FieldseekerSpeciesabundances fieldseekerSpeciesabundanceWhere[Q]
|
||||
FieldseekerStormdrains fieldseekerStormdrainWhere[Q]
|
||||
FieldseekerTimecards fieldseekerTimecardWhere[Q]
|
||||
FieldseekerTracklogs fieldseekerTracklogWhere[Q]
|
||||
FieldseekerTrapdata fieldseekerTrapdatumWhere[Q]
|
||||
FieldseekerTraplocations fieldseekerTraplocationWhere[Q]
|
||||
FieldseekerTreatments fieldseekerTreatmentWhere[Q]
|
||||
FieldseekerTreatmentareas fieldseekerTreatmentareaWhere[Q]
|
||||
FieldseekerUlvsprayroutes fieldseekerUlvsprayrouteWhere[Q]
|
||||
FieldseekerZones fieldseekerZoneWhere[Q]
|
||||
FieldseekerZones2s fieldseekerZones2Where[Q]
|
||||
FieldseekerSyncs fieldseekerSyncWhere[Q]
|
||||
FSContainerrelates fsContainerrelateWhere[Q]
|
||||
FSFieldscoutinglogs fsFieldscoutinglogWhere[Q]
|
||||
FSHabitatrelates fsHabitatrelateWhere[Q]
|
||||
FSInspectionsamples fsInspectionsampleWhere[Q]
|
||||
FSInspectionsampledetails fsInspectionsampledetailWhere[Q]
|
||||
FSLinelocations fsLinelocationWhere[Q]
|
||||
FSLocationtrackings fsLocationtrackingWhere[Q]
|
||||
FSMosquitoinspections fsMosquitoinspectionWhere[Q]
|
||||
FSPointlocations fsPointlocationWhere[Q]
|
||||
FSPolygonlocations fsPolygonlocationWhere[Q]
|
||||
FSPools fsPoolWhere[Q]
|
||||
FSPooldetails fsPooldetailWhere[Q]
|
||||
FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q]
|
||||
FSQamosquitoinspections fsQamosquitoinspectionWhere[Q]
|
||||
FSRodentlocations fsRodentlocationWhere[Q]
|
||||
FSSamplecollections fsSamplecollectionWhere[Q]
|
||||
FSSamplelocations fsSamplelocationWhere[Q]
|
||||
FSServicerequests fsServicerequestWhere[Q]
|
||||
FSSpeciesabundances fsSpeciesabundanceWhere[Q]
|
||||
FSStormdrains fsStormdrainWhere[Q]
|
||||
FSTimecards fsTimecardWhere[Q]
|
||||
FSTrapdata fsTrapdatumWhere[Q]
|
||||
FSTraplocations fsTraplocationWhere[Q]
|
||||
FSTreatments fsTreatmentWhere[Q]
|
||||
FSTreatmentareas fsTreatmentareaWhere[Q]
|
||||
FSZones fsZoneWhere[Q]
|
||||
FSZones2s fsZones2Where[Q]
|
||||
GeographyColumns geographyColumnWhere[Q]
|
||||
GeometryColumns geometryColumnWhere[Q]
|
||||
GooseDBVersions gooseDBVersionWhere[Q]
|
||||
H3Aggregations h3AggregationWhere[Q]
|
||||
HistoryContainerrelates historyContainerrelateWhere[Q]
|
||||
HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q]
|
||||
HistoryHabitatrelates historyHabitatrelateWhere[Q]
|
||||
HistoryInspectionsamples historyInspectionsampleWhere[Q]
|
||||
HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q]
|
||||
HistoryLinelocations historyLinelocationWhere[Q]
|
||||
HistoryLocationtrackings historyLocationtrackingWhere[Q]
|
||||
HistoryMosquitoinspections historyMosquitoinspectionWhere[Q]
|
||||
HistoryPointlocations historyPointlocationWhere[Q]
|
||||
HistoryPolygonlocations historyPolygonlocationWhere[Q]
|
||||
HistoryPools historyPoolWhere[Q]
|
||||
HistoryPooldetails historyPooldetailWhere[Q]
|
||||
HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q]
|
||||
HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q]
|
||||
HistoryRodentlocations historyRodentlocationWhere[Q]
|
||||
HistorySamplecollections historySamplecollectionWhere[Q]
|
||||
HistorySamplelocations historySamplelocationWhere[Q]
|
||||
HistoryServicerequests historyServicerequestWhere[Q]
|
||||
HistorySpeciesabundances historySpeciesabundanceWhere[Q]
|
||||
HistoryStormdrains historyStormdrainWhere[Q]
|
||||
HistoryTimecards historyTimecardWhere[Q]
|
||||
HistoryTrapdata historyTrapdatumWhere[Q]
|
||||
HistoryTraplocations historyTraplocationWhere[Q]
|
||||
HistoryTreatments historyTreatmentWhere[Q]
|
||||
HistoryTreatmentareas historyTreatmentareaWhere[Q]
|
||||
HistoryZones historyZoneWhere[Q]
|
||||
HistoryZones2s historyZones2Where[Q]
|
||||
Notifications notificationWhere[Q]
|
||||
OauthTokens oauthTokenWhere[Q]
|
||||
Organizations organizationWhere[Q]
|
||||
RasterColumns rasterColumnWhere[Q]
|
||||
RasterOverviews rasterOverviewWhere[Q]
|
||||
Sessions sessionWhere[Q]
|
||||
SpatialRefSys spatialRefSyWhere[Q]
|
||||
Users userWhere[Q]
|
||||
}{
|
||||
FieldseekerSyncs: buildFieldseekerSyncWhere[Q](FieldseekerSyncs.Columns),
|
||||
FSContainerrelates: buildFSContainerrelateWhere[Q](FSContainerrelates.Columns),
|
||||
FSFieldscoutinglogs: buildFSFieldscoutinglogWhere[Q](FSFieldscoutinglogs.Columns),
|
||||
FSHabitatrelates: buildFSHabitatrelateWhere[Q](FSHabitatrelates.Columns),
|
||||
FSInspectionsamples: buildFSInspectionsampleWhere[Q](FSInspectionsamples.Columns),
|
||||
FSInspectionsampledetails: buildFSInspectionsampledetailWhere[Q](FSInspectionsampledetails.Columns),
|
||||
FSLinelocations: buildFSLinelocationWhere[Q](FSLinelocations.Columns),
|
||||
FSLocationtrackings: buildFSLocationtrackingWhere[Q](FSLocationtrackings.Columns),
|
||||
FSMosquitoinspections: buildFSMosquitoinspectionWhere[Q](FSMosquitoinspections.Columns),
|
||||
FSPointlocations: buildFSPointlocationWhere[Q](FSPointlocations.Columns),
|
||||
FSPolygonlocations: buildFSPolygonlocationWhere[Q](FSPolygonlocations.Columns),
|
||||
FSPools: buildFSPoolWhere[Q](FSPools.Columns),
|
||||
FSPooldetails: buildFSPooldetailWhere[Q](FSPooldetails.Columns),
|
||||
FSProposedtreatmentareas: buildFSProposedtreatmentareaWhere[Q](FSProposedtreatmentareas.Columns),
|
||||
FSQamosquitoinspections: buildFSQamosquitoinspectionWhere[Q](FSQamosquitoinspections.Columns),
|
||||
FSRodentlocations: buildFSRodentlocationWhere[Q](FSRodentlocations.Columns),
|
||||
FSSamplecollections: buildFSSamplecollectionWhere[Q](FSSamplecollections.Columns),
|
||||
FSSamplelocations: buildFSSamplelocationWhere[Q](FSSamplelocations.Columns),
|
||||
FSServicerequests: buildFSServicerequestWhere[Q](FSServicerequests.Columns),
|
||||
FSSpeciesabundances: buildFSSpeciesabundanceWhere[Q](FSSpeciesabundances.Columns),
|
||||
FSStormdrains: buildFSStormdrainWhere[Q](FSStormdrains.Columns),
|
||||
FSTimecards: buildFSTimecardWhere[Q](FSTimecards.Columns),
|
||||
FSTrapdata: buildFSTrapdatumWhere[Q](FSTrapdata.Columns),
|
||||
FSTraplocations: buildFSTraplocationWhere[Q](FSTraplocations.Columns),
|
||||
FSTreatments: buildFSTreatmentWhere[Q](FSTreatments.Columns),
|
||||
FSTreatmentareas: buildFSTreatmentareaWhere[Q](FSTreatmentareas.Columns),
|
||||
FSZones: buildFSZoneWhere[Q](FSZones.Columns),
|
||||
FSZones2s: buildFSZones2Where[Q](FSZones2s.Columns),
|
||||
GeographyColumns: buildGeographyColumnWhere[Q](GeographyColumns.Columns),
|
||||
GeometryColumns: buildGeometryColumnWhere[Q](GeometryColumns.Columns),
|
||||
GooseDBVersions: buildGooseDBVersionWhere[Q](GooseDBVersions.Columns),
|
||||
H3Aggregations: buildH3AggregationWhere[Q](H3Aggregations.Columns),
|
||||
HistoryContainerrelates: buildHistoryContainerrelateWhere[Q](HistoryContainerrelates.Columns),
|
||||
HistoryFieldscoutinglogs: buildHistoryFieldscoutinglogWhere[Q](HistoryFieldscoutinglogs.Columns),
|
||||
HistoryHabitatrelates: buildHistoryHabitatrelateWhere[Q](HistoryHabitatrelates.Columns),
|
||||
HistoryInspectionsamples: buildHistoryInspectionsampleWhere[Q](HistoryInspectionsamples.Columns),
|
||||
HistoryInspectionsampledetails: buildHistoryInspectionsampledetailWhere[Q](HistoryInspectionsampledetails.Columns),
|
||||
HistoryLinelocations: buildHistoryLinelocationWhere[Q](HistoryLinelocations.Columns),
|
||||
HistoryLocationtrackings: buildHistoryLocationtrackingWhere[Q](HistoryLocationtrackings.Columns),
|
||||
HistoryMosquitoinspections: buildHistoryMosquitoinspectionWhere[Q](HistoryMosquitoinspections.Columns),
|
||||
HistoryPointlocations: buildHistoryPointlocationWhere[Q](HistoryPointlocations.Columns),
|
||||
HistoryPolygonlocations: buildHistoryPolygonlocationWhere[Q](HistoryPolygonlocations.Columns),
|
||||
HistoryPools: buildHistoryPoolWhere[Q](HistoryPools.Columns),
|
||||
HistoryPooldetails: buildHistoryPooldetailWhere[Q](HistoryPooldetails.Columns),
|
||||
HistoryProposedtreatmentareas: buildHistoryProposedtreatmentareaWhere[Q](HistoryProposedtreatmentareas.Columns),
|
||||
HistoryQamosquitoinspections: buildHistoryQamosquitoinspectionWhere[Q](HistoryQamosquitoinspections.Columns),
|
||||
HistoryRodentlocations: buildHistoryRodentlocationWhere[Q](HistoryRodentlocations.Columns),
|
||||
HistorySamplecollections: buildHistorySamplecollectionWhere[Q](HistorySamplecollections.Columns),
|
||||
HistorySamplelocations: buildHistorySamplelocationWhere[Q](HistorySamplelocations.Columns),
|
||||
HistoryServicerequests: buildHistoryServicerequestWhere[Q](HistoryServicerequests.Columns),
|
||||
HistorySpeciesabundances: buildHistorySpeciesabundanceWhere[Q](HistorySpeciesabundances.Columns),
|
||||
HistoryStormdrains: buildHistoryStormdrainWhere[Q](HistoryStormdrains.Columns),
|
||||
HistoryTimecards: buildHistoryTimecardWhere[Q](HistoryTimecards.Columns),
|
||||
HistoryTrapdata: buildHistoryTrapdatumWhere[Q](HistoryTrapdata.Columns),
|
||||
HistoryTraplocations: buildHistoryTraplocationWhere[Q](HistoryTraplocations.Columns),
|
||||
HistoryTreatments: buildHistoryTreatmentWhere[Q](HistoryTreatments.Columns),
|
||||
HistoryTreatmentareas: buildHistoryTreatmentareaWhere[Q](HistoryTreatmentareas.Columns),
|
||||
HistoryZones: buildHistoryZoneWhere[Q](HistoryZones.Columns),
|
||||
HistoryZones2s: buildHistoryZones2Where[Q](HistoryZones2s.Columns),
|
||||
Notifications: buildNotificationWhere[Q](Notifications.Columns),
|
||||
OauthTokens: buildOauthTokenWhere[Q](OauthTokens.Columns),
|
||||
Organizations: buildOrganizationWhere[Q](Organizations.Columns),
|
||||
RasterColumns: buildRasterColumnWhere[Q](RasterColumns.Columns),
|
||||
RasterOverviews: buildRasterOverviewWhere[Q](RasterOverviews.Columns),
|
||||
Sessions: buildSessionWhere[Q](Sessions.Columns),
|
||||
SpatialRefSys: buildSpatialRefSyWhere[Q](SpatialRefSys.Columns),
|
||||
Users: buildUserWhere[Q](Users.Columns),
|
||||
FieldseekerAerialspraylines: buildFieldseekerAerialspraylineWhere[Q](FieldseekerAerialspraylines.Columns),
|
||||
FieldseekerAerialspraysessions: buildFieldseekerAerialspraysessionWhere[Q](FieldseekerAerialspraysessions.Columns),
|
||||
FieldseekerBarriersprays: buildFieldseekerBarriersprayWhere[Q](FieldseekerBarriersprays.Columns),
|
||||
FieldseekerBarriersprayroutes: buildFieldseekerBarriersprayrouteWhere[Q](FieldseekerBarriersprayroutes.Columns),
|
||||
FieldseekerContainerrelates: buildFieldseekerContainerrelateWhere[Q](FieldseekerContainerrelates.Columns),
|
||||
FieldseekerFieldscoutinglogs: buildFieldseekerFieldscoutinglogWhere[Q](FieldseekerFieldscoutinglogs.Columns),
|
||||
FieldseekerHabitatrelates: buildFieldseekerHabitatrelateWhere[Q](FieldseekerHabitatrelates.Columns),
|
||||
FieldseekerInspectionsamples: buildFieldseekerInspectionsampleWhere[Q](FieldseekerInspectionsamples.Columns),
|
||||
FieldseekerInspectionsampledetails: buildFieldseekerInspectionsampledetailWhere[Q](FieldseekerInspectionsampledetails.Columns),
|
||||
FieldseekerLandingcounts: buildFieldseekerLandingcountWhere[Q](FieldseekerLandingcounts.Columns),
|
||||
FieldseekerLandingcountlocations: buildFieldseekerLandingcountlocationWhere[Q](FieldseekerLandingcountlocations.Columns),
|
||||
FieldseekerLinelocations: buildFieldseekerLinelocationWhere[Q](FieldseekerLinelocations.Columns),
|
||||
FieldseekerLocationtrackings: buildFieldseekerLocationtrackingWhere[Q](FieldseekerLocationtrackings.Columns),
|
||||
FieldseekerMosquitoinspections: buildFieldseekerMosquitoinspectionWhere[Q](FieldseekerMosquitoinspections.Columns),
|
||||
FieldseekerPointlocations: buildFieldseekerPointlocationWhere[Q](FieldseekerPointlocations.Columns),
|
||||
FieldseekerPolygonlocations: buildFieldseekerPolygonlocationWhere[Q](FieldseekerPolygonlocations.Columns),
|
||||
FieldseekerPools: buildFieldseekerPoolWhere[Q](FieldseekerPools.Columns),
|
||||
FieldseekerPoolbuffers: buildFieldseekerPoolbufferWhere[Q](FieldseekerPoolbuffers.Columns),
|
||||
FieldseekerPooldetails: buildFieldseekerPooldetailWhere[Q](FieldseekerPooldetails.Columns),
|
||||
FieldseekerProposedtreatmentareas: buildFieldseekerProposedtreatmentareaWhere[Q](FieldseekerProposedtreatmentareas.Columns),
|
||||
FieldseekerQalarvcounts: buildFieldseekerQalarvcountWhere[Q](FieldseekerQalarvcounts.Columns),
|
||||
FieldseekerQamosquitoinspections: buildFieldseekerQamosquitoinspectionWhere[Q](FieldseekerQamosquitoinspections.Columns),
|
||||
FieldseekerQaproductobservations: buildFieldseekerQaproductobservationWhere[Q](FieldseekerQaproductobservations.Columns),
|
||||
FieldseekerRestrictedareas: buildFieldseekerRestrictedareaWhere[Q](FieldseekerRestrictedareas.Columns),
|
||||
FieldseekerRodentinspections: buildFieldseekerRodentinspectionWhere[Q](FieldseekerRodentinspections.Columns),
|
||||
FieldseekerRodentlocations: buildFieldseekerRodentlocationWhere[Q](FieldseekerRodentlocations.Columns),
|
||||
FieldseekerSamplecollections: buildFieldseekerSamplecollectionWhere[Q](FieldseekerSamplecollections.Columns),
|
||||
FieldseekerSamplelocations: buildFieldseekerSamplelocationWhere[Q](FieldseekerSamplelocations.Columns),
|
||||
FieldseekerServicerequests: buildFieldseekerServicerequestWhere[Q](FieldseekerServicerequests.Columns),
|
||||
FieldseekerSpeciesabundances: buildFieldseekerSpeciesabundanceWhere[Q](FieldseekerSpeciesabundances.Columns),
|
||||
FieldseekerStormdrains: buildFieldseekerStormdrainWhere[Q](FieldseekerStormdrains.Columns),
|
||||
FieldseekerTimecards: buildFieldseekerTimecardWhere[Q](FieldseekerTimecards.Columns),
|
||||
FieldseekerTracklogs: buildFieldseekerTracklogWhere[Q](FieldseekerTracklogs.Columns),
|
||||
FieldseekerTrapdata: buildFieldseekerTrapdatumWhere[Q](FieldseekerTrapdata.Columns),
|
||||
FieldseekerTraplocations: buildFieldseekerTraplocationWhere[Q](FieldseekerTraplocations.Columns),
|
||||
FieldseekerTreatments: buildFieldseekerTreatmentWhere[Q](FieldseekerTreatments.Columns),
|
||||
FieldseekerTreatmentareas: buildFieldseekerTreatmentareaWhere[Q](FieldseekerTreatmentareas.Columns),
|
||||
FieldseekerUlvsprayroutes: buildFieldseekerUlvsprayrouteWhere[Q](FieldseekerUlvsprayroutes.Columns),
|
||||
FieldseekerZones: buildFieldseekerZoneWhere[Q](FieldseekerZones.Columns),
|
||||
FieldseekerZones2s: buildFieldseekerZones2Where[Q](FieldseekerZones2s.Columns),
|
||||
FieldseekerSyncs: buildFieldseekerSyncWhere[Q](FieldseekerSyncs.Columns),
|
||||
FSContainerrelates: buildFSContainerrelateWhere[Q](FSContainerrelates.Columns),
|
||||
FSFieldscoutinglogs: buildFSFieldscoutinglogWhere[Q](FSFieldscoutinglogs.Columns),
|
||||
FSHabitatrelates: buildFSHabitatrelateWhere[Q](FSHabitatrelates.Columns),
|
||||
FSInspectionsamples: buildFSInspectionsampleWhere[Q](FSInspectionsamples.Columns),
|
||||
FSInspectionsampledetails: buildFSInspectionsampledetailWhere[Q](FSInspectionsampledetails.Columns),
|
||||
FSLinelocations: buildFSLinelocationWhere[Q](FSLinelocations.Columns),
|
||||
FSLocationtrackings: buildFSLocationtrackingWhere[Q](FSLocationtrackings.Columns),
|
||||
FSMosquitoinspections: buildFSMosquitoinspectionWhere[Q](FSMosquitoinspections.Columns),
|
||||
FSPointlocations: buildFSPointlocationWhere[Q](FSPointlocations.Columns),
|
||||
FSPolygonlocations: buildFSPolygonlocationWhere[Q](FSPolygonlocations.Columns),
|
||||
FSPools: buildFSPoolWhere[Q](FSPools.Columns),
|
||||
FSPooldetails: buildFSPooldetailWhere[Q](FSPooldetails.Columns),
|
||||
FSProposedtreatmentareas: buildFSProposedtreatmentareaWhere[Q](FSProposedtreatmentareas.Columns),
|
||||
FSQamosquitoinspections: buildFSQamosquitoinspectionWhere[Q](FSQamosquitoinspections.Columns),
|
||||
FSRodentlocations: buildFSRodentlocationWhere[Q](FSRodentlocations.Columns),
|
||||
FSSamplecollections: buildFSSamplecollectionWhere[Q](FSSamplecollections.Columns),
|
||||
FSSamplelocations: buildFSSamplelocationWhere[Q](FSSamplelocations.Columns),
|
||||
FSServicerequests: buildFSServicerequestWhere[Q](FSServicerequests.Columns),
|
||||
FSSpeciesabundances: buildFSSpeciesabundanceWhere[Q](FSSpeciesabundances.Columns),
|
||||
FSStormdrains: buildFSStormdrainWhere[Q](FSStormdrains.Columns),
|
||||
FSTimecards: buildFSTimecardWhere[Q](FSTimecards.Columns),
|
||||
FSTrapdata: buildFSTrapdatumWhere[Q](FSTrapdata.Columns),
|
||||
FSTraplocations: buildFSTraplocationWhere[Q](FSTraplocations.Columns),
|
||||
FSTreatments: buildFSTreatmentWhere[Q](FSTreatments.Columns),
|
||||
FSTreatmentareas: buildFSTreatmentareaWhere[Q](FSTreatmentareas.Columns),
|
||||
FSZones: buildFSZoneWhere[Q](FSZones.Columns),
|
||||
FSZones2s: buildFSZones2Where[Q](FSZones2s.Columns),
|
||||
GeographyColumns: buildGeographyColumnWhere[Q](GeographyColumns.Columns),
|
||||
GeometryColumns: buildGeometryColumnWhere[Q](GeometryColumns.Columns),
|
||||
GooseDBVersions: buildGooseDBVersionWhere[Q](GooseDBVersions.Columns),
|
||||
H3Aggregations: buildH3AggregationWhere[Q](H3Aggregations.Columns),
|
||||
HistoryContainerrelates: buildHistoryContainerrelateWhere[Q](HistoryContainerrelates.Columns),
|
||||
HistoryFieldscoutinglogs: buildHistoryFieldscoutinglogWhere[Q](HistoryFieldscoutinglogs.Columns),
|
||||
HistoryHabitatrelates: buildHistoryHabitatrelateWhere[Q](HistoryHabitatrelates.Columns),
|
||||
HistoryInspectionsamples: buildHistoryInspectionsampleWhere[Q](HistoryInspectionsamples.Columns),
|
||||
HistoryInspectionsampledetails: buildHistoryInspectionsampledetailWhere[Q](HistoryInspectionsampledetails.Columns),
|
||||
HistoryLinelocations: buildHistoryLinelocationWhere[Q](HistoryLinelocations.Columns),
|
||||
HistoryLocationtrackings: buildHistoryLocationtrackingWhere[Q](HistoryLocationtrackings.Columns),
|
||||
HistoryMosquitoinspections: buildHistoryMosquitoinspectionWhere[Q](HistoryMosquitoinspections.Columns),
|
||||
HistoryPointlocations: buildHistoryPointlocationWhere[Q](HistoryPointlocations.Columns),
|
||||
HistoryPolygonlocations: buildHistoryPolygonlocationWhere[Q](HistoryPolygonlocations.Columns),
|
||||
HistoryPools: buildHistoryPoolWhere[Q](HistoryPools.Columns),
|
||||
HistoryPooldetails: buildHistoryPooldetailWhere[Q](HistoryPooldetails.Columns),
|
||||
HistoryProposedtreatmentareas: buildHistoryProposedtreatmentareaWhere[Q](HistoryProposedtreatmentareas.Columns),
|
||||
HistoryQamosquitoinspections: buildHistoryQamosquitoinspectionWhere[Q](HistoryQamosquitoinspections.Columns),
|
||||
HistoryRodentlocations: buildHistoryRodentlocationWhere[Q](HistoryRodentlocations.Columns),
|
||||
HistorySamplecollections: buildHistorySamplecollectionWhere[Q](HistorySamplecollections.Columns),
|
||||
HistorySamplelocations: buildHistorySamplelocationWhere[Q](HistorySamplelocations.Columns),
|
||||
HistoryServicerequests: buildHistoryServicerequestWhere[Q](HistoryServicerequests.Columns),
|
||||
HistorySpeciesabundances: buildHistorySpeciesabundanceWhere[Q](HistorySpeciesabundances.Columns),
|
||||
HistoryStormdrains: buildHistoryStormdrainWhere[Q](HistoryStormdrains.Columns),
|
||||
HistoryTimecards: buildHistoryTimecardWhere[Q](HistoryTimecards.Columns),
|
||||
HistoryTrapdata: buildHistoryTrapdatumWhere[Q](HistoryTrapdata.Columns),
|
||||
HistoryTraplocations: buildHistoryTraplocationWhere[Q](HistoryTraplocations.Columns),
|
||||
HistoryTreatments: buildHistoryTreatmentWhere[Q](HistoryTreatments.Columns),
|
||||
HistoryTreatmentareas: buildHistoryTreatmentareaWhere[Q](HistoryTreatmentareas.Columns),
|
||||
HistoryZones: buildHistoryZoneWhere[Q](HistoryZones.Columns),
|
||||
HistoryZones2s: buildHistoryZones2Where[Q](HistoryZones2s.Columns),
|
||||
Notifications: buildNotificationWhere[Q](Notifications.Columns),
|
||||
OauthTokens: buildOauthTokenWhere[Q](OauthTokens.Columns),
|
||||
Organizations: buildOrganizationWhere[Q](Organizations.Columns),
|
||||
RasterColumns: buildRasterColumnWhere[Q](RasterColumns.Columns),
|
||||
RasterOverviews: buildRasterOverviewWhere[Q](RasterOverviews.Columns),
|
||||
Sessions: buildSessionWhere[Q](Sessions.Columns),
|
||||
SpatialRefSys: buildSpatialRefSyWhere[Q](SpatialRefSys.Columns),
|
||||
Users: buildUserWhere[Q](Users.Columns),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
79
db/models/fieldseeker.aerialsprayline.bob.go
Normal file
79
db/models/fieldseeker.aerialsprayline.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerAerialsprayline is an object representing the database table.
|
||||
type FieldseekerAerialsprayline struct{}
|
||||
|
||||
// FieldseekerAerialspraylineSlice is an alias for a slice of pointers to FieldseekerAerialsprayline.
|
||||
// This should almost always be used instead of []*FieldseekerAerialsprayline.
|
||||
type FieldseekerAerialspraylineSlice []*FieldseekerAerialsprayline
|
||||
|
||||
// FieldseekerAerialspraylines contains methods to work with the aerialsprayline view
|
||||
var FieldseekerAerialspraylines = psql.NewViewx[*FieldseekerAerialsprayline, FieldseekerAerialspraylineSlice]("fieldseeker", "aerialsprayline", buildFieldseekerAerialspraylineColumns("fieldseeker.aerialsprayline"))
|
||||
|
||||
// FieldseekerAerialspraylinesQuery is a query on the aerialsprayline view
|
||||
type FieldseekerAerialspraylinesQuery = *psql.ViewQuery[*FieldseekerAerialsprayline, FieldseekerAerialspraylineSlice]
|
||||
|
||||
func buildFieldseekerAerialspraylineColumns(alias string) fieldseekerAerialspraylineColumns {
|
||||
return fieldseekerAerialspraylineColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.aerialsprayline"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerAerialspraylineColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerAerialspraylineColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerAerialspraylineColumns) AliasedAs(alias string) fieldseekerAerialspraylineColumns {
|
||||
return buildFieldseekerAerialspraylineColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerAerialsprayline is retrieved from the database
|
||||
func (o *FieldseekerAerialsprayline) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerAerialspraylines.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerAerialspraylineSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerAerialspraylineSlice is retrieved from the database
|
||||
func (o FieldseekerAerialspraylineSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerAerialspraylines.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerAerialspraylineWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerAerialspraylineWhere[Q]) AliasedAs(alias string) fieldseekerAerialspraylineWhere[Q] {
|
||||
return buildFieldseekerAerialspraylineWhere[Q](buildFieldseekerAerialspraylineColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerAerialspraylineWhere[Q psql.Filterable](cols fieldseekerAerialspraylineColumns) fieldseekerAerialspraylineWhere[Q] {
|
||||
return fieldseekerAerialspraylineWhere[Q]{}
|
||||
}
|
||||
79
db/models/fieldseeker.aerialspraysession.bob.go
Normal file
79
db/models/fieldseeker.aerialspraysession.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerAerialspraysession is an object representing the database table.
|
||||
type FieldseekerAerialspraysession struct{}
|
||||
|
||||
// FieldseekerAerialspraysessionSlice is an alias for a slice of pointers to FieldseekerAerialspraysession.
|
||||
// This should almost always be used instead of []*FieldseekerAerialspraysession.
|
||||
type FieldseekerAerialspraysessionSlice []*FieldseekerAerialspraysession
|
||||
|
||||
// FieldseekerAerialspraysessions contains methods to work with the aerialspraysession view
|
||||
var FieldseekerAerialspraysessions = psql.NewViewx[*FieldseekerAerialspraysession, FieldseekerAerialspraysessionSlice]("fieldseeker", "aerialspraysession", buildFieldseekerAerialspraysessionColumns("fieldseeker.aerialspraysession"))
|
||||
|
||||
// FieldseekerAerialspraysessionsQuery is a query on the aerialspraysession view
|
||||
type FieldseekerAerialspraysessionsQuery = *psql.ViewQuery[*FieldseekerAerialspraysession, FieldseekerAerialspraysessionSlice]
|
||||
|
||||
func buildFieldseekerAerialspraysessionColumns(alias string) fieldseekerAerialspraysessionColumns {
|
||||
return fieldseekerAerialspraysessionColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.aerialspraysession"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerAerialspraysessionColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerAerialspraysessionColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerAerialspraysessionColumns) AliasedAs(alias string) fieldseekerAerialspraysessionColumns {
|
||||
return buildFieldseekerAerialspraysessionColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerAerialspraysession is retrieved from the database
|
||||
func (o *FieldseekerAerialspraysession) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerAerialspraysessions.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerAerialspraysessionSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerAerialspraysessionSlice is retrieved from the database
|
||||
func (o FieldseekerAerialspraysessionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerAerialspraysessions.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerAerialspraysessionWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerAerialspraysessionWhere[Q]) AliasedAs(alias string) fieldseekerAerialspraysessionWhere[Q] {
|
||||
return buildFieldseekerAerialspraysessionWhere[Q](buildFieldseekerAerialspraysessionColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerAerialspraysessionWhere[Q psql.Filterable](cols fieldseekerAerialspraysessionColumns) fieldseekerAerialspraysessionWhere[Q] {
|
||||
return fieldseekerAerialspraysessionWhere[Q]{}
|
||||
}
|
||||
79
db/models/fieldseeker.barrierspray.bob.go
Normal file
79
db/models/fieldseeker.barrierspray.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerBarrierspray is an object representing the database table.
|
||||
type FieldseekerBarrierspray struct{}
|
||||
|
||||
// FieldseekerBarrierspraySlice is an alias for a slice of pointers to FieldseekerBarrierspray.
|
||||
// This should almost always be used instead of []*FieldseekerBarrierspray.
|
||||
type FieldseekerBarrierspraySlice []*FieldseekerBarrierspray
|
||||
|
||||
// FieldseekerBarriersprays contains methods to work with the barrierspray view
|
||||
var FieldseekerBarriersprays = psql.NewViewx[*FieldseekerBarrierspray, FieldseekerBarrierspraySlice]("fieldseeker", "barrierspray", buildFieldseekerBarriersprayColumns("fieldseeker.barrierspray"))
|
||||
|
||||
// FieldseekerBarrierspraysQuery is a query on the barrierspray view
|
||||
type FieldseekerBarrierspraysQuery = *psql.ViewQuery[*FieldseekerBarrierspray, FieldseekerBarrierspraySlice]
|
||||
|
||||
func buildFieldseekerBarriersprayColumns(alias string) fieldseekerBarriersprayColumns {
|
||||
return fieldseekerBarriersprayColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.barrierspray"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerBarriersprayColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerBarriersprayColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerBarriersprayColumns) AliasedAs(alias string) fieldseekerBarriersprayColumns {
|
||||
return buildFieldseekerBarriersprayColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerBarrierspray is retrieved from the database
|
||||
func (o *FieldseekerBarrierspray) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerBarriersprays.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerBarrierspraySlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerBarrierspraySlice is retrieved from the database
|
||||
func (o FieldseekerBarrierspraySlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerBarriersprays.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerBarriersprayWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerBarriersprayWhere[Q]) AliasedAs(alias string) fieldseekerBarriersprayWhere[Q] {
|
||||
return buildFieldseekerBarriersprayWhere[Q](buildFieldseekerBarriersprayColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerBarriersprayWhere[Q psql.Filterable](cols fieldseekerBarriersprayColumns) fieldseekerBarriersprayWhere[Q] {
|
||||
return fieldseekerBarriersprayWhere[Q]{}
|
||||
}
|
||||
79
db/models/fieldseeker.barriersprayroute.bob.go
Normal file
79
db/models/fieldseeker.barriersprayroute.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerBarriersprayroute is an object representing the database table.
|
||||
type FieldseekerBarriersprayroute struct{}
|
||||
|
||||
// FieldseekerBarriersprayrouteSlice is an alias for a slice of pointers to FieldseekerBarriersprayroute.
|
||||
// This should almost always be used instead of []*FieldseekerBarriersprayroute.
|
||||
type FieldseekerBarriersprayrouteSlice []*FieldseekerBarriersprayroute
|
||||
|
||||
// FieldseekerBarriersprayroutes contains methods to work with the barriersprayroute view
|
||||
var FieldseekerBarriersprayroutes = psql.NewViewx[*FieldseekerBarriersprayroute, FieldseekerBarriersprayrouteSlice]("fieldseeker", "barriersprayroute", buildFieldseekerBarriersprayrouteColumns("fieldseeker.barriersprayroute"))
|
||||
|
||||
// FieldseekerBarriersprayroutesQuery is a query on the barriersprayroute view
|
||||
type FieldseekerBarriersprayroutesQuery = *psql.ViewQuery[*FieldseekerBarriersprayroute, FieldseekerBarriersprayrouteSlice]
|
||||
|
||||
func buildFieldseekerBarriersprayrouteColumns(alias string) fieldseekerBarriersprayrouteColumns {
|
||||
return fieldseekerBarriersprayrouteColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.barriersprayroute"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerBarriersprayrouteColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerBarriersprayrouteColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerBarriersprayrouteColumns) AliasedAs(alias string) fieldseekerBarriersprayrouteColumns {
|
||||
return buildFieldseekerBarriersprayrouteColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerBarriersprayroute is retrieved from the database
|
||||
func (o *FieldseekerBarriersprayroute) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerBarriersprayroutes.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerBarriersprayrouteSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerBarriersprayrouteSlice is retrieved from the database
|
||||
func (o FieldseekerBarriersprayrouteSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerBarriersprayroutes.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerBarriersprayrouteWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerBarriersprayrouteWhere[Q]) AliasedAs(alias string) fieldseekerBarriersprayrouteWhere[Q] {
|
||||
return buildFieldseekerBarriersprayrouteWhere[Q](buildFieldseekerBarriersprayrouteColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerBarriersprayrouteWhere[Q psql.Filterable](cols fieldseekerBarriersprayrouteColumns) fieldseekerBarriersprayrouteWhere[Q] {
|
||||
return fieldseekerBarriersprayrouteWhere[Q]{}
|
||||
}
|
||||
679
db/models/fieldseeker.containerrelate.bob.go
Normal file
679
db/models/fieldseeker.containerrelate.bob.go
Normal file
|
|
@ -0,0 +1,679 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerContainerrelate is an object representing the database table.
|
||||
type FieldseekerContainerrelate struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Inspsampleid null.Val[uuid.UUID] `db:"inspsampleid" `
|
||||
Mosquitoinspid null.Val[uuid.UUID] `db:"mosquitoinspid" `
|
||||
Treatmentid null.Val[uuid.UUID] `db:"treatmentid" `
|
||||
// Container Type
|
||||
Containertype null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] `db:"containertype" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerContainerrelateSlice is an alias for a slice of pointers to FieldseekerContainerrelate.
|
||||
// This should almost always be used instead of []*FieldseekerContainerrelate.
|
||||
type FieldseekerContainerrelateSlice []*FieldseekerContainerrelate
|
||||
|
||||
// FieldseekerContainerrelates contains methods to work with the containerrelate table
|
||||
var FieldseekerContainerrelates = psql.NewTablex[*FieldseekerContainerrelate, FieldseekerContainerrelateSlice, *FieldseekerContainerrelateSetter]("fieldseeker", "containerrelate", buildFieldseekerContainerrelateColumns("fieldseeker.containerrelate"))
|
||||
|
||||
// FieldseekerContainerrelatesQuery is a query on the containerrelate table
|
||||
type FieldseekerContainerrelatesQuery = *psql.ViewQuery[*FieldseekerContainerrelate, FieldseekerContainerrelateSlice]
|
||||
|
||||
func buildFieldseekerContainerrelateColumns(alias string) fieldseekerContainerrelateColumns {
|
||||
return fieldseekerContainerrelateColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "inspsampleid", "mosquitoinspid", "treatmentid", "containertype", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.containerrelate"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Inspsampleid: psql.Quote(alias, "inspsampleid"),
|
||||
Mosquitoinspid: psql.Quote(alias, "mosquitoinspid"),
|
||||
Treatmentid: psql.Quote(alias, "treatmentid"),
|
||||
Containertype: psql.Quote(alias, "containertype"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerContainerrelateColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Inspsampleid psql.Expression
|
||||
Mosquitoinspid psql.Expression
|
||||
Treatmentid psql.Expression
|
||||
Containertype psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerContainerrelateColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerContainerrelateColumns) AliasedAs(alias string) fieldseekerContainerrelateColumns {
|
||||
return buildFieldseekerContainerrelateColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerContainerrelateSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerContainerrelateSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Inspsampleid omitnull.Val[uuid.UUID] `db:"inspsampleid" `
|
||||
Mosquitoinspid omitnull.Val[uuid.UUID] `db:"mosquitoinspid" `
|
||||
Treatmentid omitnull.Val[uuid.UUID] `db:"treatmentid" `
|
||||
Containertype omitnull.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] `db:"containertype" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerContainerrelateSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Inspsampleid.IsUnset() {
|
||||
vals = append(vals, "inspsampleid")
|
||||
}
|
||||
if !s.Mosquitoinspid.IsUnset() {
|
||||
vals = append(vals, "mosquitoinspid")
|
||||
}
|
||||
if !s.Treatmentid.IsUnset() {
|
||||
vals = append(vals, "treatmentid")
|
||||
}
|
||||
if !s.Containertype.IsUnset() {
|
||||
vals = append(vals, "containertype")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerContainerrelateSetter) Overwrite(t *FieldseekerContainerrelate) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Inspsampleid.IsUnset() {
|
||||
t.Inspsampleid = s.Inspsampleid.MustGetNull()
|
||||
}
|
||||
if !s.Mosquitoinspid.IsUnset() {
|
||||
t.Mosquitoinspid = s.Mosquitoinspid.MustGetNull()
|
||||
}
|
||||
if !s.Treatmentid.IsUnset() {
|
||||
t.Treatmentid = s.Treatmentid.MustGetNull()
|
||||
}
|
||||
if !s.Containertype.IsUnset() {
|
||||
t.Containertype = s.Containertype.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerContainerrelateSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerContainerrelates.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[2] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[3] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[4] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[5] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Inspsampleid.IsUnset() {
|
||||
vals[6] = psql.Arg(s.Inspsampleid.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Mosquitoinspid.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Mosquitoinspid.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Treatmentid.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Treatmentid.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Containertype.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Containertype.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerContainerrelateSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerContainerrelateSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 14)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Inspsampleid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "inspsampleid")...),
|
||||
psql.Arg(s.Inspsampleid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Mosquitoinspid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "mosquitoinspid")...),
|
||||
psql.Arg(s.Mosquitoinspid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Treatmentid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "treatmentid")...),
|
||||
psql.Arg(s.Treatmentid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Containertype.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "containertype")...),
|
||||
psql.Arg(s.Containertype),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerContainerrelate retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerContainerrelate(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerContainerrelate, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerContainerrelates.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerContainerrelateExists checks the presence of a single record by primary key
|
||||
func FieldseekerContainerrelateExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerContainerrelate is retrieved from the database
|
||||
func (o *FieldseekerContainerrelate) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerContainerrelates.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerContainerrelates.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerContainerrelates.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerContainerrelates.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerContainerrelate
|
||||
func (o *FieldseekerContainerrelate) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerContainerrelate) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.containerrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerContainerrelate
|
||||
func (o *FieldseekerContainerrelate) Update(ctx context.Context, exec bob.Executor, s *FieldseekerContainerrelateSetter) error {
|
||||
v, err := FieldseekerContainerrelates.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerContainerrelate record with an executor
|
||||
func (o *FieldseekerContainerrelate) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerContainerrelates.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerContainerrelate using the executor
|
||||
func (o *FieldseekerContainerrelate) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerContainerrelateSlice is retrieved from the database
|
||||
func (o FieldseekerContainerrelateSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerContainerrelates.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerContainerrelates.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerContainerrelates.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerContainerrelates.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerContainerrelateSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.containerrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerContainerrelateSlice) copyMatchingRows(from ...*FieldseekerContainerrelate) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerContainerrelateSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerContainerrelates.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerContainerrelate:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerContainerrelate:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerContainerrelateSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerContainerrelate or a slice of FieldseekerContainerrelate
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerContainerrelates.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerContainerrelateSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerContainerrelates.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerContainerrelate:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerContainerrelate:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerContainerrelateSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerContainerrelate or a slice of FieldseekerContainerrelate
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerContainerrelates.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerContainerrelateSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerContainerrelateSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerContainerrelates.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerContainerrelateSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerContainerrelates.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerContainerrelateSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerContainerrelates.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerContainerrelateWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Inspsampleid psql.WhereNullMod[Q, uuid.UUID]
|
||||
Mosquitoinspid psql.WhereNullMod[Q, uuid.UUID]
|
||||
Treatmentid psql.WhereNullMod[Q, uuid.UUID]
|
||||
Containertype psql.WhereNullMod[Q, enums.FieldseekerContainerrelateMosquitocontainertypeEnum]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerContainerrelateWhere[Q]) AliasedAs(alias string) fieldseekerContainerrelateWhere[Q] {
|
||||
return buildFieldseekerContainerrelateWhere[Q](buildFieldseekerContainerrelateColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerContainerrelateWhere[Q psql.Filterable](cols fieldseekerContainerrelateColumns) fieldseekerContainerrelateWhere[Q] {
|
||||
return fieldseekerContainerrelateWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Inspsampleid: psql.WhereNull[Q, uuid.UUID](cols.Inspsampleid),
|
||||
Mosquitoinspid: psql.WhereNull[Q, uuid.UUID](cols.Mosquitoinspid),
|
||||
Treatmentid: psql.WhereNull[Q, uuid.UUID](cols.Treatmentid),
|
||||
Containertype: psql.WhereNull[Q, enums.FieldseekerContainerrelateMosquitocontainertypeEnum](cols.Containertype),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
604
db/models/fieldseeker.fieldscoutinglog.bob.go
Normal file
604
db/models/fieldseeker.fieldscoutinglog.bob.go
Normal file
|
|
@ -0,0 +1,604 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerFieldscoutinglog is an object representing the database table.
|
||||
type FieldseekerFieldscoutinglog struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
// Status
|
||||
Status null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] `db:"status" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerFieldscoutinglogSlice is an alias for a slice of pointers to FieldseekerFieldscoutinglog.
|
||||
// This should almost always be used instead of []*FieldseekerFieldscoutinglog.
|
||||
type FieldseekerFieldscoutinglogSlice []*FieldseekerFieldscoutinglog
|
||||
|
||||
// FieldseekerFieldscoutinglogs contains methods to work with the fieldscoutinglog table
|
||||
var FieldseekerFieldscoutinglogs = psql.NewTablex[*FieldseekerFieldscoutinglog, FieldseekerFieldscoutinglogSlice, *FieldseekerFieldscoutinglogSetter]("fieldseeker", "fieldscoutinglog", buildFieldseekerFieldscoutinglogColumns("fieldseeker.fieldscoutinglog"))
|
||||
|
||||
// FieldseekerFieldscoutinglogsQuery is a query on the fieldscoutinglog table
|
||||
type FieldseekerFieldscoutinglogsQuery = *psql.ViewQuery[*FieldseekerFieldscoutinglog, FieldseekerFieldscoutinglogSlice]
|
||||
|
||||
func buildFieldseekerFieldscoutinglogColumns(alias string) fieldseekerFieldscoutinglogColumns {
|
||||
return fieldseekerFieldscoutinglogColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "status", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.fieldscoutinglog"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Status: psql.Quote(alias, "status"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerFieldscoutinglogColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Status psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerFieldscoutinglogColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerFieldscoutinglogColumns) AliasedAs(alias string) fieldseekerFieldscoutinglogColumns {
|
||||
return buildFieldseekerFieldscoutinglogColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerFieldscoutinglogSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerFieldscoutinglogSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Status omitnull.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] `db:"status" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerFieldscoutinglogSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 11)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Status.IsUnset() {
|
||||
vals = append(vals, "status")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerFieldscoutinglogSetter) Overwrite(t *FieldseekerFieldscoutinglog) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Status.IsUnset() {
|
||||
t.Status = s.Status.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerFieldscoutinglogSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerFieldscoutinglogs.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 11)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Status.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Status.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[3] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[4] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[5] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[6] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerFieldscoutinglogSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerFieldscoutinglogSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 11)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Status.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "status")...),
|
||||
psql.Arg(s.Status),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerFieldscoutinglog retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerFieldscoutinglog(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerFieldscoutinglog, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerFieldscoutinglogs.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerFieldscoutinglogExists checks the presence of a single record by primary key
|
||||
func FieldseekerFieldscoutinglogExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerFieldscoutinglog is retrieved from the database
|
||||
func (o *FieldseekerFieldscoutinglog) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerFieldscoutinglog
|
||||
func (o *FieldseekerFieldscoutinglog) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerFieldscoutinglog) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.fieldscoutinglog", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerFieldscoutinglog
|
||||
func (o *FieldseekerFieldscoutinglog) Update(ctx context.Context, exec bob.Executor, s *FieldseekerFieldscoutinglogSetter) error {
|
||||
v, err := FieldseekerFieldscoutinglogs.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerFieldscoutinglog record with an executor
|
||||
func (o *FieldseekerFieldscoutinglog) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerFieldscoutinglogs.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerFieldscoutinglog using the executor
|
||||
func (o *FieldseekerFieldscoutinglog) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerFieldscoutinglogSlice is retrieved from the database
|
||||
func (o FieldseekerFieldscoutinglogSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerFieldscoutinglogs.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerFieldscoutinglogSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.fieldscoutinglog", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerFieldscoutinglogSlice) copyMatchingRows(from ...*FieldseekerFieldscoutinglog) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerFieldscoutinglogSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerFieldscoutinglogs.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerFieldscoutinglog:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerFieldscoutinglog:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerFieldscoutinglogSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerFieldscoutinglog or a slice of FieldseekerFieldscoutinglog
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerFieldscoutinglogs.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerFieldscoutinglogSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerFieldscoutinglogs.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerFieldscoutinglog:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerFieldscoutinglog:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerFieldscoutinglogSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerFieldscoutinglog or a slice of FieldseekerFieldscoutinglog
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerFieldscoutinglogs.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerFieldscoutinglogSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerFieldscoutinglogSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerFieldscoutinglogs.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerFieldscoutinglogSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerFieldscoutinglogs.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerFieldscoutinglogSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerFieldscoutinglogs.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerFieldscoutinglogWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Status psql.WhereNullMod[Q, enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerFieldscoutinglogWhere[Q]) AliasedAs(alias string) fieldseekerFieldscoutinglogWhere[Q] {
|
||||
return buildFieldseekerFieldscoutinglogWhere[Q](buildFieldseekerFieldscoutinglogColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerFieldscoutinglogWhere[Q psql.Filterable](cols fieldseekerFieldscoutinglogColumns) fieldseekerFieldscoutinglogWhere[Q] {
|
||||
return fieldseekerFieldscoutinglogWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Status: psql.WhereNull[Q, enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum](cols.Status),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
629
db/models/fieldseeker.habitatrelate.bob.go
Normal file
629
db/models/fieldseeker.habitatrelate.bob.go
Normal file
|
|
@ -0,0 +1,629 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerHabitatrelate is an object representing the database table.
|
||||
type FieldseekerHabitatrelate struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
ForeignID null.Val[uuid.UUID] `db:"foreign_id" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
// Habitat Type
|
||||
Habitattype null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] `db:"habitattype" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerHabitatrelateSlice is an alias for a slice of pointers to FieldseekerHabitatrelate.
|
||||
// This should almost always be used instead of []*FieldseekerHabitatrelate.
|
||||
type FieldseekerHabitatrelateSlice []*FieldseekerHabitatrelate
|
||||
|
||||
// FieldseekerHabitatrelates contains methods to work with the habitatrelate table
|
||||
var FieldseekerHabitatrelates = psql.NewTablex[*FieldseekerHabitatrelate, FieldseekerHabitatrelateSlice, *FieldseekerHabitatrelateSetter]("fieldseeker", "habitatrelate", buildFieldseekerHabitatrelateColumns("fieldseeker.habitatrelate"))
|
||||
|
||||
// FieldseekerHabitatrelatesQuery is a query on the habitatrelate table
|
||||
type FieldseekerHabitatrelatesQuery = *psql.ViewQuery[*FieldseekerHabitatrelate, FieldseekerHabitatrelateSlice]
|
||||
|
||||
func buildFieldseekerHabitatrelateColumns(alias string) fieldseekerHabitatrelateColumns {
|
||||
return fieldseekerHabitatrelateColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "foreign_id", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "habitattype", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.habitatrelate"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
ForeignID: psql.Quote(alias, "foreign_id"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Habitattype: psql.Quote(alias, "habitattype"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerHabitatrelateColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
ForeignID psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Habitattype psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerHabitatrelateColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerHabitatrelateColumns) AliasedAs(alias string) fieldseekerHabitatrelateColumns {
|
||||
return buildFieldseekerHabitatrelateColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerHabitatrelateSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerHabitatrelateSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
ForeignID omitnull.Val[uuid.UUID] `db:"foreign_id" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Habitattype omitnull.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] `db:"habitattype" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerHabitatrelateSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 12)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.ForeignID.IsUnset() {
|
||||
vals = append(vals, "foreign_id")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Habitattype.IsUnset() {
|
||||
vals = append(vals, "habitattype")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerHabitatrelateSetter) Overwrite(t *FieldseekerHabitatrelate) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.ForeignID.IsUnset() {
|
||||
t.ForeignID = s.ForeignID.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Habitattype.IsUnset() {
|
||||
t.Habitattype = s.Habitattype.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerHabitatrelateSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerHabitatrelates.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 12)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ForeignID.IsUnset() {
|
||||
vals[1] = psql.Arg(s.ForeignID.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[3] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[4] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[5] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[6] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Habitattype.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Habitattype.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerHabitatrelateSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerHabitatrelateSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 12)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ForeignID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "foreign_id")...),
|
||||
psql.Arg(s.ForeignID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Habitattype.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "habitattype")...),
|
||||
psql.Arg(s.Habitattype),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerHabitatrelate retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerHabitatrelate(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerHabitatrelate, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerHabitatrelates.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerHabitatrelateExists checks the presence of a single record by primary key
|
||||
func FieldseekerHabitatrelateExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerHabitatrelate is retrieved from the database
|
||||
func (o *FieldseekerHabitatrelate) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerHabitatrelate
|
||||
func (o *FieldseekerHabitatrelate) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerHabitatrelate) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.habitatrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerHabitatrelate
|
||||
func (o *FieldseekerHabitatrelate) Update(ctx context.Context, exec bob.Executor, s *FieldseekerHabitatrelateSetter) error {
|
||||
v, err := FieldseekerHabitatrelates.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerHabitatrelate record with an executor
|
||||
func (o *FieldseekerHabitatrelate) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerHabitatrelates.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerHabitatrelate using the executor
|
||||
func (o *FieldseekerHabitatrelate) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerHabitatrelateSlice is retrieved from the database
|
||||
func (o FieldseekerHabitatrelateSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerHabitatrelates.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerHabitatrelateSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.habitatrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerHabitatrelateSlice) copyMatchingRows(from ...*FieldseekerHabitatrelate) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerHabitatrelateSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerHabitatrelates.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerHabitatrelate:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerHabitatrelate:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerHabitatrelateSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerHabitatrelate or a slice of FieldseekerHabitatrelate
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerHabitatrelates.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerHabitatrelateSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerHabitatrelates.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerHabitatrelate:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerHabitatrelate:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerHabitatrelateSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerHabitatrelate or a slice of FieldseekerHabitatrelate
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerHabitatrelates.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerHabitatrelateSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerHabitatrelateSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerHabitatrelates.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerHabitatrelateSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerHabitatrelates.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerHabitatrelateSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerHabitatrelates.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerHabitatrelateWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
ForeignID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Habitattype psql.WhereNullMod[Q, enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerHabitatrelateWhere[Q]) AliasedAs(alias string) fieldseekerHabitatrelateWhere[Q] {
|
||||
return buildFieldseekerHabitatrelateWhere[Q](buildFieldseekerHabitatrelateColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerHabitatrelateWhere[Q psql.Filterable](cols fieldseekerHabitatrelateColumns) fieldseekerHabitatrelateWhere[Q] {
|
||||
return fieldseekerHabitatrelateWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
ForeignID: psql.WhereNull[Q, uuid.UUID](cols.ForeignID),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Habitattype: psql.WhereNull[Q, enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284](cols.Habitattype),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
681
db/models/fieldseeker.inspectionsample.bob.go
Normal file
681
db/models/fieldseeker.inspectionsample.bob.go
Normal file
|
|
@ -0,0 +1,681 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerInspectionsample is an object representing the database table.
|
||||
type FieldseekerInspectionsample struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
InspID null.Val[uuid.UUID] `db:"insp_id" `
|
||||
// Sample ID
|
||||
Sampleid null.Val[string] `db:"sampleid" `
|
||||
// Processed
|
||||
Processed null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] `db:"processed" `
|
||||
// Tech Identifying Species in Lab
|
||||
Idbytech null.Val[string] `db:"idbytech" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerInspectionsampleSlice is an alias for a slice of pointers to FieldseekerInspectionsample.
|
||||
// This should almost always be used instead of []*FieldseekerInspectionsample.
|
||||
type FieldseekerInspectionsampleSlice []*FieldseekerInspectionsample
|
||||
|
||||
// FieldseekerInspectionsamples contains methods to work with the inspectionsample table
|
||||
var FieldseekerInspectionsamples = psql.NewTablex[*FieldseekerInspectionsample, FieldseekerInspectionsampleSlice, *FieldseekerInspectionsampleSetter]("fieldseeker", "inspectionsample", buildFieldseekerInspectionsampleColumns("fieldseeker.inspectionsample"))
|
||||
|
||||
// FieldseekerInspectionsamplesQuery is a query on the inspectionsample table
|
||||
type FieldseekerInspectionsamplesQuery = *psql.ViewQuery[*FieldseekerInspectionsample, FieldseekerInspectionsampleSlice]
|
||||
|
||||
func buildFieldseekerInspectionsampleColumns(alias string) fieldseekerInspectionsampleColumns {
|
||||
return fieldseekerInspectionsampleColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "insp_id", "sampleid", "processed", "idbytech", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.inspectionsample"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
InspID: psql.Quote(alias, "insp_id"),
|
||||
Sampleid: psql.Quote(alias, "sampleid"),
|
||||
Processed: psql.Quote(alias, "processed"),
|
||||
Idbytech: psql.Quote(alias, "idbytech"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerInspectionsampleColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
InspID psql.Expression
|
||||
Sampleid psql.Expression
|
||||
Processed psql.Expression
|
||||
Idbytech psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerInspectionsampleColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerInspectionsampleColumns) AliasedAs(alias string) fieldseekerInspectionsampleColumns {
|
||||
return buildFieldseekerInspectionsampleColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerInspectionsampleSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerInspectionsampleSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
InspID omitnull.Val[uuid.UUID] `db:"insp_id" `
|
||||
Sampleid omitnull.Val[string] `db:"sampleid" `
|
||||
Processed omitnull.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] `db:"processed" `
|
||||
Idbytech omitnull.Val[string] `db:"idbytech" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampleSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.InspID.IsUnset() {
|
||||
vals = append(vals, "insp_id")
|
||||
}
|
||||
if !s.Sampleid.IsUnset() {
|
||||
vals = append(vals, "sampleid")
|
||||
}
|
||||
if !s.Processed.IsUnset() {
|
||||
vals = append(vals, "processed")
|
||||
}
|
||||
if !s.Idbytech.IsUnset() {
|
||||
vals = append(vals, "idbytech")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampleSetter) Overwrite(t *FieldseekerInspectionsample) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.InspID.IsUnset() {
|
||||
t.InspID = s.InspID.MustGetNull()
|
||||
}
|
||||
if !s.Sampleid.IsUnset() {
|
||||
t.Sampleid = s.Sampleid.MustGetNull()
|
||||
}
|
||||
if !s.Processed.IsUnset() {
|
||||
t.Processed = s.Processed.MustGetNull()
|
||||
}
|
||||
if !s.Idbytech.IsUnset() {
|
||||
t.Idbytech = s.Idbytech.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerInspectionsampleSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerInspectionsamples.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.InspID.IsUnset() {
|
||||
vals[1] = psql.Arg(s.InspID.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Sampleid.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Sampleid.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Processed.IsUnset() {
|
||||
vals[3] = psql.Arg(s.Processed.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Idbytech.IsUnset() {
|
||||
vals[4] = psql.Arg(s.Idbytech.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[5] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[6] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[7] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[8] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[9] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampleSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampleSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 14)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.InspID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "insp_id")...),
|
||||
psql.Arg(s.InspID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Sampleid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "sampleid")...),
|
||||
psql.Arg(s.Sampleid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Processed.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "processed")...),
|
||||
psql.Arg(s.Processed),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Idbytech.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "idbytech")...),
|
||||
psql.Arg(s.Idbytech),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerInspectionsample retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerInspectionsample(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerInspectionsample, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerInspectionsamples.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerInspectionsampleExists checks the presence of a single record by primary key
|
||||
func FieldseekerInspectionsampleExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerInspectionsample is retrieved from the database
|
||||
func (o *FieldseekerInspectionsample) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerInspectionsample
|
||||
func (o *FieldseekerInspectionsample) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerInspectionsample) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.inspectionsample", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerInspectionsample
|
||||
func (o *FieldseekerInspectionsample) Update(ctx context.Context, exec bob.Executor, s *FieldseekerInspectionsampleSetter) error {
|
||||
v, err := FieldseekerInspectionsamples.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerInspectionsample record with an executor
|
||||
func (o *FieldseekerInspectionsample) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerInspectionsamples.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerInspectionsample using the executor
|
||||
func (o *FieldseekerInspectionsample) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerInspectionsampleSlice is retrieved from the database
|
||||
func (o FieldseekerInspectionsampleSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerInspectionsamples.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampleSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.inspectionsample", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerInspectionsampleSlice) copyMatchingRows(from ...*FieldseekerInspectionsample) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerInspectionsampleSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerInspectionsamples.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerInspectionsample:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerInspectionsample:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerInspectionsampleSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerInspectionsample or a slice of FieldseekerInspectionsample
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerInspectionsamples.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerInspectionsampleSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerInspectionsamples.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerInspectionsample:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerInspectionsample:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerInspectionsampleSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerInspectionsample or a slice of FieldseekerInspectionsample
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerInspectionsamples.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampleSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerInspectionsampleSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerInspectionsamples.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampleSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerInspectionsamples.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampleSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerInspectionsamples.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerInspectionsampleWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
InspID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Sampleid psql.WhereNullMod[Q, string]
|
||||
Processed psql.WhereNullMod[Q, enums.FieldseekerInspectionsampleNotinuitFEnum]
|
||||
Idbytech psql.WhereNullMod[Q, string]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerInspectionsampleWhere[Q]) AliasedAs(alias string) fieldseekerInspectionsampleWhere[Q] {
|
||||
return buildFieldseekerInspectionsampleWhere[Q](buildFieldseekerInspectionsampleColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerInspectionsampleWhere[Q psql.Filterable](cols fieldseekerInspectionsampleColumns) fieldseekerInspectionsampleWhere[Q] {
|
||||
return fieldseekerInspectionsampleWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
InspID: psql.WhereNull[Q, uuid.UUID](cols.InspID),
|
||||
Sampleid: psql.WhereNull[Q, string](cols.Sampleid),
|
||||
Processed: psql.WhereNull[Q, enums.FieldseekerInspectionsampleNotinuitFEnum](cols.Processed),
|
||||
Idbytech: psql.WhereNull[Q, string](cols.Idbytech),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
966
db/models/fieldseeker.inspectionsampledetail.bob.go
Normal file
966
db/models/fieldseeker.inspectionsampledetail.bob.go
Normal file
|
|
@ -0,0 +1,966 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerInspectionsampledetail is an object representing the database table.
|
||||
type FieldseekerInspectionsampledetail struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
InspsampleID null.Val[uuid.UUID] `db:"inspsample_id" `
|
||||
// Field Species
|
||||
Fieldspecies null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] `db:"fieldspecies" `
|
||||
// Field Larva Count
|
||||
Flarvcount null.Val[int16] `db:"flarvcount" `
|
||||
// Field Pupa Count
|
||||
Fpupcount null.Val[int16] `db:"fpupcount" `
|
||||
// Field Egg Count
|
||||
Feggcount null.Val[int16] `db:"feggcount" `
|
||||
// Field Larval Stages
|
||||
Flstages null.Val[string] `db:"flstages" `
|
||||
// Field Dominant Stage
|
||||
Fdomstage null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"fdomstage" `
|
||||
// Field Adult Activity
|
||||
Fadultact null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] `db:"fadultact" `
|
||||
// Lab Species
|
||||
Labspecies null.Val[string] `db:"labspecies" `
|
||||
// Lab Larva Count
|
||||
Llarvcount null.Val[int16] `db:"llarvcount" `
|
||||
// Lab Pupa Count
|
||||
Lpupcount null.Val[int16] `db:"lpupcount" `
|
||||
// Lab Egg Count
|
||||
Leggcount null.Val[int16] `db:"leggcount" `
|
||||
// Lab Dominant Stage
|
||||
Ldomstage null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"ldomstage" `
|
||||
// Comments
|
||||
Comments null.Val[string] `db:"comments" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Processed null.Val[int16] `db:"processed" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerInspectionsampledetailSlice is an alias for a slice of pointers to FieldseekerInspectionsampledetail.
|
||||
// This should almost always be used instead of []*FieldseekerInspectionsampledetail.
|
||||
type FieldseekerInspectionsampledetailSlice []*FieldseekerInspectionsampledetail
|
||||
|
||||
// FieldseekerInspectionsampledetails contains methods to work with the inspectionsampledetail table
|
||||
var FieldseekerInspectionsampledetails = psql.NewTablex[*FieldseekerInspectionsampledetail, FieldseekerInspectionsampledetailSlice, *FieldseekerInspectionsampledetailSetter]("fieldseeker", "inspectionsampledetail", buildFieldseekerInspectionsampledetailColumns("fieldseeker.inspectionsampledetail"))
|
||||
|
||||
// FieldseekerInspectionsampledetailsQuery is a query on the inspectionsampledetail table
|
||||
type FieldseekerInspectionsampledetailsQuery = *psql.ViewQuery[*FieldseekerInspectionsampledetail, FieldseekerInspectionsampledetailSlice]
|
||||
|
||||
func buildFieldseekerInspectionsampledetailColumns(alias string) fieldseekerInspectionsampledetailColumns {
|
||||
return fieldseekerInspectionsampledetailColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "inspsample_id", "fieldspecies", "flarvcount", "fpupcount", "feggcount", "flstages", "fdomstage", "fadultact", "labspecies", "llarvcount", "lpupcount", "leggcount", "ldomstage", "comments", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "processed", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.inspectionsampledetail"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
InspsampleID: psql.Quote(alias, "inspsample_id"),
|
||||
Fieldspecies: psql.Quote(alias, "fieldspecies"),
|
||||
Flarvcount: psql.Quote(alias, "flarvcount"),
|
||||
Fpupcount: psql.Quote(alias, "fpupcount"),
|
||||
Feggcount: psql.Quote(alias, "feggcount"),
|
||||
Flstages: psql.Quote(alias, "flstages"),
|
||||
Fdomstage: psql.Quote(alias, "fdomstage"),
|
||||
Fadultact: psql.Quote(alias, "fadultact"),
|
||||
Labspecies: psql.Quote(alias, "labspecies"),
|
||||
Llarvcount: psql.Quote(alias, "llarvcount"),
|
||||
Lpupcount: psql.Quote(alias, "lpupcount"),
|
||||
Leggcount: psql.Quote(alias, "leggcount"),
|
||||
Ldomstage: psql.Quote(alias, "ldomstage"),
|
||||
Comments: psql.Quote(alias, "comments"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Processed: psql.Quote(alias, "processed"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerInspectionsampledetailColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
InspsampleID psql.Expression
|
||||
Fieldspecies psql.Expression
|
||||
Flarvcount psql.Expression
|
||||
Fpupcount psql.Expression
|
||||
Feggcount psql.Expression
|
||||
Flstages psql.Expression
|
||||
Fdomstage psql.Expression
|
||||
Fadultact psql.Expression
|
||||
Labspecies psql.Expression
|
||||
Llarvcount psql.Expression
|
||||
Lpupcount psql.Expression
|
||||
Leggcount psql.Expression
|
||||
Ldomstage psql.Expression
|
||||
Comments psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Processed psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerInspectionsampledetailColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerInspectionsampledetailColumns) AliasedAs(alias string) fieldseekerInspectionsampledetailColumns {
|
||||
return buildFieldseekerInspectionsampledetailColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerInspectionsampledetailSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerInspectionsampledetailSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
InspsampleID omitnull.Val[uuid.UUID] `db:"inspsample_id" `
|
||||
Fieldspecies omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] `db:"fieldspecies" `
|
||||
Flarvcount omitnull.Val[int16] `db:"flarvcount" `
|
||||
Fpupcount omitnull.Val[int16] `db:"fpupcount" `
|
||||
Feggcount omitnull.Val[int16] `db:"feggcount" `
|
||||
Flstages omitnull.Val[string] `db:"flstages" `
|
||||
Fdomstage omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"fdomstage" `
|
||||
Fadultact omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] `db:"fadultact" `
|
||||
Labspecies omitnull.Val[string] `db:"labspecies" `
|
||||
Llarvcount omitnull.Val[int16] `db:"llarvcount" `
|
||||
Lpupcount omitnull.Val[int16] `db:"lpupcount" `
|
||||
Leggcount omitnull.Val[int16] `db:"leggcount" `
|
||||
Ldomstage omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"ldomstage" `
|
||||
Comments omitnull.Val[string] `db:"comments" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Processed omitnull.Val[int16] `db:"processed" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampledetailSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 25)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.InspsampleID.IsUnset() {
|
||||
vals = append(vals, "inspsample_id")
|
||||
}
|
||||
if !s.Fieldspecies.IsUnset() {
|
||||
vals = append(vals, "fieldspecies")
|
||||
}
|
||||
if !s.Flarvcount.IsUnset() {
|
||||
vals = append(vals, "flarvcount")
|
||||
}
|
||||
if !s.Fpupcount.IsUnset() {
|
||||
vals = append(vals, "fpupcount")
|
||||
}
|
||||
if !s.Feggcount.IsUnset() {
|
||||
vals = append(vals, "feggcount")
|
||||
}
|
||||
if !s.Flstages.IsUnset() {
|
||||
vals = append(vals, "flstages")
|
||||
}
|
||||
if !s.Fdomstage.IsUnset() {
|
||||
vals = append(vals, "fdomstage")
|
||||
}
|
||||
if !s.Fadultact.IsUnset() {
|
||||
vals = append(vals, "fadultact")
|
||||
}
|
||||
if !s.Labspecies.IsUnset() {
|
||||
vals = append(vals, "labspecies")
|
||||
}
|
||||
if !s.Llarvcount.IsUnset() {
|
||||
vals = append(vals, "llarvcount")
|
||||
}
|
||||
if !s.Lpupcount.IsUnset() {
|
||||
vals = append(vals, "lpupcount")
|
||||
}
|
||||
if !s.Leggcount.IsUnset() {
|
||||
vals = append(vals, "leggcount")
|
||||
}
|
||||
if !s.Ldomstage.IsUnset() {
|
||||
vals = append(vals, "ldomstage")
|
||||
}
|
||||
if !s.Comments.IsUnset() {
|
||||
vals = append(vals, "comments")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Processed.IsUnset() {
|
||||
vals = append(vals, "processed")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampledetailSetter) Overwrite(t *FieldseekerInspectionsampledetail) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.InspsampleID.IsUnset() {
|
||||
t.InspsampleID = s.InspsampleID.MustGetNull()
|
||||
}
|
||||
if !s.Fieldspecies.IsUnset() {
|
||||
t.Fieldspecies = s.Fieldspecies.MustGetNull()
|
||||
}
|
||||
if !s.Flarvcount.IsUnset() {
|
||||
t.Flarvcount = s.Flarvcount.MustGetNull()
|
||||
}
|
||||
if !s.Fpupcount.IsUnset() {
|
||||
t.Fpupcount = s.Fpupcount.MustGetNull()
|
||||
}
|
||||
if !s.Feggcount.IsUnset() {
|
||||
t.Feggcount = s.Feggcount.MustGetNull()
|
||||
}
|
||||
if !s.Flstages.IsUnset() {
|
||||
t.Flstages = s.Flstages.MustGetNull()
|
||||
}
|
||||
if !s.Fdomstage.IsUnset() {
|
||||
t.Fdomstage = s.Fdomstage.MustGetNull()
|
||||
}
|
||||
if !s.Fadultact.IsUnset() {
|
||||
t.Fadultact = s.Fadultact.MustGetNull()
|
||||
}
|
||||
if !s.Labspecies.IsUnset() {
|
||||
t.Labspecies = s.Labspecies.MustGetNull()
|
||||
}
|
||||
if !s.Llarvcount.IsUnset() {
|
||||
t.Llarvcount = s.Llarvcount.MustGetNull()
|
||||
}
|
||||
if !s.Lpupcount.IsUnset() {
|
||||
t.Lpupcount = s.Lpupcount.MustGetNull()
|
||||
}
|
||||
if !s.Leggcount.IsUnset() {
|
||||
t.Leggcount = s.Leggcount.MustGetNull()
|
||||
}
|
||||
if !s.Ldomstage.IsUnset() {
|
||||
t.Ldomstage = s.Ldomstage.MustGetNull()
|
||||
}
|
||||
if !s.Comments.IsUnset() {
|
||||
t.Comments = s.Comments.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Processed.IsUnset() {
|
||||
t.Processed = s.Processed.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerInspectionsampledetailSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerInspectionsampledetails.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 25)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.InspsampleID.IsUnset() {
|
||||
vals[1] = psql.Arg(s.InspsampleID.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Fieldspecies.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Fieldspecies.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Flarvcount.IsUnset() {
|
||||
vals[3] = psql.Arg(s.Flarvcount.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Fpupcount.IsUnset() {
|
||||
vals[4] = psql.Arg(s.Fpupcount.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Feggcount.IsUnset() {
|
||||
vals[5] = psql.Arg(s.Feggcount.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Flstages.IsUnset() {
|
||||
vals[6] = psql.Arg(s.Flstages.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Fdomstage.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Fdomstage.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Fadultact.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Fadultact.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Labspecies.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Labspecies.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Llarvcount.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Llarvcount.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Lpupcount.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Lpupcount.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Leggcount.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Leggcount.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Ldomstage.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Ldomstage.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Comments.IsUnset() {
|
||||
vals[14] = psql.Arg(s.Comments.MustGetNull())
|
||||
} else {
|
||||
vals[14] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[15] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[15] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[16] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[16] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[17] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[17] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[18] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[18] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[19] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[19] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Processed.IsUnset() {
|
||||
vals[20] = psql.Arg(s.Processed.MustGetNull())
|
||||
} else {
|
||||
vals[20] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[21] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[21] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[22] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[22] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[23] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[23] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[24] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[24] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampledetailSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerInspectionsampledetailSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 25)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.InspsampleID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "inspsample_id")...),
|
||||
psql.Arg(s.InspsampleID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Fieldspecies.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "fieldspecies")...),
|
||||
psql.Arg(s.Fieldspecies),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Flarvcount.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "flarvcount")...),
|
||||
psql.Arg(s.Flarvcount),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Fpupcount.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "fpupcount")...),
|
||||
psql.Arg(s.Fpupcount),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Feggcount.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "feggcount")...),
|
||||
psql.Arg(s.Feggcount),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Flstages.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "flstages")...),
|
||||
psql.Arg(s.Flstages),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Fdomstage.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "fdomstage")...),
|
||||
psql.Arg(s.Fdomstage),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Fadultact.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "fadultact")...),
|
||||
psql.Arg(s.Fadultact),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Labspecies.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "labspecies")...),
|
||||
psql.Arg(s.Labspecies),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Llarvcount.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "llarvcount")...),
|
||||
psql.Arg(s.Llarvcount),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Lpupcount.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "lpupcount")...),
|
||||
psql.Arg(s.Lpupcount),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Leggcount.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "leggcount")...),
|
||||
psql.Arg(s.Leggcount),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Ldomstage.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "ldomstage")...),
|
||||
psql.Arg(s.Ldomstage),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Comments.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "comments")...),
|
||||
psql.Arg(s.Comments),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Processed.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "processed")...),
|
||||
psql.Arg(s.Processed),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerInspectionsampledetail retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerInspectionsampledetail(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerInspectionsampledetail, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerInspectionsampledetails.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerInspectionsampledetailExists checks the presence of a single record by primary key
|
||||
func FieldseekerInspectionsampledetailExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerInspectionsampledetail is retrieved from the database
|
||||
func (o *FieldseekerInspectionsampledetail) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerInspectionsampledetail
|
||||
func (o *FieldseekerInspectionsampledetail) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerInspectionsampledetail) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.inspectionsampledetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerInspectionsampledetail
|
||||
func (o *FieldseekerInspectionsampledetail) Update(ctx context.Context, exec bob.Executor, s *FieldseekerInspectionsampledetailSetter) error {
|
||||
v, err := FieldseekerInspectionsampledetails.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerInspectionsampledetail record with an executor
|
||||
func (o *FieldseekerInspectionsampledetail) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerInspectionsampledetails.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerInspectionsampledetail using the executor
|
||||
func (o *FieldseekerInspectionsampledetail) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerInspectionsampledetailSlice is retrieved from the database
|
||||
func (o FieldseekerInspectionsampledetailSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerInspectionsampledetails.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampledetailSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.inspectionsampledetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerInspectionsampledetailSlice) copyMatchingRows(from ...*FieldseekerInspectionsampledetail) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerInspectionsampledetailSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerInspectionsampledetails.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerInspectionsampledetail:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerInspectionsampledetail:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerInspectionsampledetailSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerInspectionsampledetail or a slice of FieldseekerInspectionsampledetail
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerInspectionsampledetails.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerInspectionsampledetailSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerInspectionsampledetails.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerInspectionsampledetail:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerInspectionsampledetail:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerInspectionsampledetailSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerInspectionsampledetail or a slice of FieldseekerInspectionsampledetail
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerInspectionsampledetails.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampledetailSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerInspectionsampledetailSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerInspectionsampledetails.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampledetailSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerInspectionsampledetails.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerInspectionsampledetailSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerInspectionsampledetails.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerInspectionsampledetailWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
InspsampleID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Fieldspecies psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum]
|
||||
Flarvcount psql.WhereNullMod[Q, int16]
|
||||
Fpupcount psql.WhereNullMod[Q, int16]
|
||||
Feggcount psql.WhereNullMod[Q, int16]
|
||||
Flstages psql.WhereNullMod[Q, string]
|
||||
Fdomstage psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum]
|
||||
Fadultact psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum]
|
||||
Labspecies psql.WhereNullMod[Q, string]
|
||||
Llarvcount psql.WhereNullMod[Q, int16]
|
||||
Lpupcount psql.WhereNullMod[Q, int16]
|
||||
Leggcount psql.WhereNullMod[Q, int16]
|
||||
Ldomstage psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum]
|
||||
Comments psql.WhereNullMod[Q, string]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Processed psql.WhereNullMod[Q, int16]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerInspectionsampledetailWhere[Q]) AliasedAs(alias string) fieldseekerInspectionsampledetailWhere[Q] {
|
||||
return buildFieldseekerInspectionsampledetailWhere[Q](buildFieldseekerInspectionsampledetailColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerInspectionsampledetailWhere[Q psql.Filterable](cols fieldseekerInspectionsampledetailColumns) fieldseekerInspectionsampledetailWhere[Q] {
|
||||
return fieldseekerInspectionsampledetailWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
InspsampleID: psql.WhereNull[Q, uuid.UUID](cols.InspsampleID),
|
||||
Fieldspecies: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum](cols.Fieldspecies),
|
||||
Flarvcount: psql.WhereNull[Q, int16](cols.Flarvcount),
|
||||
Fpupcount: psql.WhereNull[Q, int16](cols.Fpupcount),
|
||||
Feggcount: psql.WhereNull[Q, int16](cols.Feggcount),
|
||||
Flstages: psql.WhereNull[Q, string](cols.Flstages),
|
||||
Fdomstage: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum](cols.Fdomstage),
|
||||
Fadultact: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum](cols.Fadultact),
|
||||
Labspecies: psql.WhereNull[Q, string](cols.Labspecies),
|
||||
Llarvcount: psql.WhereNull[Q, int16](cols.Llarvcount),
|
||||
Lpupcount: psql.WhereNull[Q, int16](cols.Lpupcount),
|
||||
Leggcount: psql.WhereNull[Q, int16](cols.Leggcount),
|
||||
Ldomstage: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum](cols.Ldomstage),
|
||||
Comments: psql.WhereNull[Q, string](cols.Comments),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Processed: psql.WhereNull[Q, int16](cols.Processed),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
79
db/models/fieldseeker.landingcount.bob.go
Normal file
79
db/models/fieldseeker.landingcount.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerLandingcount is an object representing the database table.
|
||||
type FieldseekerLandingcount struct{}
|
||||
|
||||
// FieldseekerLandingcountSlice is an alias for a slice of pointers to FieldseekerLandingcount.
|
||||
// This should almost always be used instead of []*FieldseekerLandingcount.
|
||||
type FieldseekerLandingcountSlice []*FieldseekerLandingcount
|
||||
|
||||
// FieldseekerLandingcounts contains methods to work with the landingcount view
|
||||
var FieldseekerLandingcounts = psql.NewViewx[*FieldseekerLandingcount, FieldseekerLandingcountSlice]("fieldseeker", "landingcount", buildFieldseekerLandingcountColumns("fieldseeker.landingcount"))
|
||||
|
||||
// FieldseekerLandingcountsQuery is a query on the landingcount view
|
||||
type FieldseekerLandingcountsQuery = *psql.ViewQuery[*FieldseekerLandingcount, FieldseekerLandingcountSlice]
|
||||
|
||||
func buildFieldseekerLandingcountColumns(alias string) fieldseekerLandingcountColumns {
|
||||
return fieldseekerLandingcountColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.landingcount"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerLandingcountColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerLandingcountColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerLandingcountColumns) AliasedAs(alias string) fieldseekerLandingcountColumns {
|
||||
return buildFieldseekerLandingcountColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerLandingcount is retrieved from the database
|
||||
func (o *FieldseekerLandingcount) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerLandingcounts.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLandingcountSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerLandingcountSlice is retrieved from the database
|
||||
func (o FieldseekerLandingcountSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerLandingcounts.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerLandingcountWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerLandingcountWhere[Q]) AliasedAs(alias string) fieldseekerLandingcountWhere[Q] {
|
||||
return buildFieldseekerLandingcountWhere[Q](buildFieldseekerLandingcountColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerLandingcountWhere[Q psql.Filterable](cols fieldseekerLandingcountColumns) fieldseekerLandingcountWhere[Q] {
|
||||
return fieldseekerLandingcountWhere[Q]{}
|
||||
}
|
||||
79
db/models/fieldseeker.landingcountlocation.bob.go
Normal file
79
db/models/fieldseeker.landingcountlocation.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerLandingcountlocation is an object representing the database table.
|
||||
type FieldseekerLandingcountlocation struct{}
|
||||
|
||||
// FieldseekerLandingcountlocationSlice is an alias for a slice of pointers to FieldseekerLandingcountlocation.
|
||||
// This should almost always be used instead of []*FieldseekerLandingcountlocation.
|
||||
type FieldseekerLandingcountlocationSlice []*FieldseekerLandingcountlocation
|
||||
|
||||
// FieldseekerLandingcountlocations contains methods to work with the landingcountlocation view
|
||||
var FieldseekerLandingcountlocations = psql.NewViewx[*FieldseekerLandingcountlocation, FieldseekerLandingcountlocationSlice]("fieldseeker", "landingcountlocation", buildFieldseekerLandingcountlocationColumns("fieldseeker.landingcountlocation"))
|
||||
|
||||
// FieldseekerLandingcountlocationsQuery is a query on the landingcountlocation view
|
||||
type FieldseekerLandingcountlocationsQuery = *psql.ViewQuery[*FieldseekerLandingcountlocation, FieldseekerLandingcountlocationSlice]
|
||||
|
||||
func buildFieldseekerLandingcountlocationColumns(alias string) fieldseekerLandingcountlocationColumns {
|
||||
return fieldseekerLandingcountlocationColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.landingcountlocation"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerLandingcountlocationColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerLandingcountlocationColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerLandingcountlocationColumns) AliasedAs(alias string) fieldseekerLandingcountlocationColumns {
|
||||
return buildFieldseekerLandingcountlocationColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerLandingcountlocation is retrieved from the database
|
||||
func (o *FieldseekerLandingcountlocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerLandingcountlocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLandingcountlocationSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerLandingcountlocationSlice is retrieved from the database
|
||||
func (o FieldseekerLandingcountlocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerLandingcountlocations.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerLandingcountlocationWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerLandingcountlocationWhere[Q]) AliasedAs(alias string) fieldseekerLandingcountlocationWhere[Q] {
|
||||
return buildFieldseekerLandingcountlocationWhere[Q](buildFieldseekerLandingcountlocationColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerLandingcountlocationWhere[Q psql.Filterable](cols fieldseekerLandingcountlocationColumns) fieldseekerLandingcountlocationWhere[Q] {
|
||||
return fieldseekerLandingcountlocationWhere[Q]{}
|
||||
}
|
||||
1564
db/models/fieldseeker.linelocation.bob.go
Normal file
1564
db/models/fieldseeker.linelocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
629
db/models/fieldseeker.locationtracking.bob.go
Normal file
629
db/models/fieldseeker.locationtracking.bob.go
Normal file
|
|
@ -0,0 +1,629 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerLocationtracking is an object representing the database table.
|
||||
type FieldseekerLocationtracking struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
// Accuracy(m)
|
||||
Accuracy null.Val[float64] `db:"accuracy" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
// Field Tech
|
||||
Fieldtech null.Val[string] `db:"fieldtech" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerLocationtrackingSlice is an alias for a slice of pointers to FieldseekerLocationtracking.
|
||||
// This should almost always be used instead of []*FieldseekerLocationtracking.
|
||||
type FieldseekerLocationtrackingSlice []*FieldseekerLocationtracking
|
||||
|
||||
// FieldseekerLocationtrackings contains methods to work with the locationtracking table
|
||||
var FieldseekerLocationtrackings = psql.NewTablex[*FieldseekerLocationtracking, FieldseekerLocationtrackingSlice, *FieldseekerLocationtrackingSetter]("fieldseeker", "locationtracking", buildFieldseekerLocationtrackingColumns("fieldseeker.locationtracking"))
|
||||
|
||||
// FieldseekerLocationtrackingsQuery is a query on the locationtracking table
|
||||
type FieldseekerLocationtrackingsQuery = *psql.ViewQuery[*FieldseekerLocationtracking, FieldseekerLocationtrackingSlice]
|
||||
|
||||
func buildFieldseekerLocationtrackingColumns(alias string) fieldseekerLocationtrackingColumns {
|
||||
return fieldseekerLocationtrackingColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "accuracy", "created_user", "created_date", "last_edited_user", "last_edited_date", "globalid", "fieldtech", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.locationtracking"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Accuracy: psql.Quote(alias, "accuracy"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
Fieldtech: psql.Quote(alias, "fieldtech"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerLocationtrackingColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Accuracy psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Globalid psql.Expression
|
||||
Fieldtech psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerLocationtrackingColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerLocationtrackingColumns) AliasedAs(alias string) fieldseekerLocationtrackingColumns {
|
||||
return buildFieldseekerLocationtrackingColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerLocationtrackingSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerLocationtrackingSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Accuracy omitnull.Val[float64] `db:"accuracy" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
Fieldtech omitnull.Val[string] `db:"fieldtech" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerLocationtrackingSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 12)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Accuracy.IsUnset() {
|
||||
vals = append(vals, "accuracy")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.Fieldtech.IsUnset() {
|
||||
vals = append(vals, "fieldtech")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerLocationtrackingSetter) Overwrite(t *FieldseekerLocationtracking) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Accuracy.IsUnset() {
|
||||
t.Accuracy = s.Accuracy.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.Fieldtech.IsUnset() {
|
||||
t.Fieldtech = s.Fieldtech.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerLocationtrackingSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerLocationtrackings.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 12)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Accuracy.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Accuracy.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[2] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[3] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[4] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[5] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[6] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Fieldtech.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Fieldtech.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerLocationtrackingSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerLocationtrackingSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 12)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Accuracy.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "accuracy")...),
|
||||
psql.Arg(s.Accuracy),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Fieldtech.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "fieldtech")...),
|
||||
psql.Arg(s.Fieldtech),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerLocationtracking retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerLocationtracking(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerLocationtracking, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerLocationtrackings.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerLocationtrackingExists checks the presence of a single record by primary key
|
||||
func FieldseekerLocationtrackingExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerLocationtracking is retrieved from the database
|
||||
func (o *FieldseekerLocationtracking) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerLocationtracking
|
||||
func (o *FieldseekerLocationtracking) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerLocationtracking) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.locationtracking", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerLocationtracking
|
||||
func (o *FieldseekerLocationtracking) Update(ctx context.Context, exec bob.Executor, s *FieldseekerLocationtrackingSetter) error {
|
||||
v, err := FieldseekerLocationtrackings.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerLocationtracking record with an executor
|
||||
func (o *FieldseekerLocationtracking) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerLocationtrackings.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerLocationtracking using the executor
|
||||
func (o *FieldseekerLocationtracking) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerLocationtrackingSlice is retrieved from the database
|
||||
func (o FieldseekerLocationtrackingSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerLocationtrackings.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerLocationtrackingSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.locationtracking", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerLocationtrackingSlice) copyMatchingRows(from ...*FieldseekerLocationtracking) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerLocationtrackingSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerLocationtrackings.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerLocationtracking:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerLocationtracking:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerLocationtrackingSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerLocationtracking or a slice of FieldseekerLocationtracking
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerLocationtrackings.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerLocationtrackingSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerLocationtrackings.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerLocationtracking:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerLocationtracking:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerLocationtrackingSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerLocationtracking or a slice of FieldseekerLocationtracking
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerLocationtrackings.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerLocationtrackingSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerLocationtrackingSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerLocationtrackings.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerLocationtrackingSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerLocationtrackings.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerLocationtrackingSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerLocationtrackings.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerLocationtrackingWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Accuracy psql.WhereNullMod[Q, float64]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
Fieldtech psql.WhereNullMod[Q, string]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerLocationtrackingWhere[Q]) AliasedAs(alias string) fieldseekerLocationtrackingWhere[Q] {
|
||||
return buildFieldseekerLocationtrackingWhere[Q](buildFieldseekerLocationtrackingColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerLocationtrackingWhere[Q psql.Filterable](cols fieldseekerLocationtrackingColumns) fieldseekerLocationtrackingWhere[Q] {
|
||||
return fieldseekerLocationtrackingWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Accuracy: psql.WhereNull[Q, float64](cols.Accuracy),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
1794
db/models/fieldseeker.mosquitoinspection.bob.go
Normal file
1794
db/models/fieldseeker.mosquitoinspection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1461
db/models/fieldseeker.pointlocation.bob.go
Normal file
1461
db/models/fieldseeker.pointlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1410
db/models/fieldseeker.polygonlocation.bob.go
Normal file
1410
db/models/fieldseeker.polygonlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1041
db/models/fieldseeker.pool.bob.go
Normal file
1041
db/models/fieldseeker.pool.bob.go
Normal file
File diff suppressed because it is too large
Load diff
79
db/models/fieldseeker.poolbuffer.bob.go
Normal file
79
db/models/fieldseeker.poolbuffer.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerPoolbuffer is an object representing the database table.
|
||||
type FieldseekerPoolbuffer struct{}
|
||||
|
||||
// FieldseekerPoolbufferSlice is an alias for a slice of pointers to FieldseekerPoolbuffer.
|
||||
// This should almost always be used instead of []*FieldseekerPoolbuffer.
|
||||
type FieldseekerPoolbufferSlice []*FieldseekerPoolbuffer
|
||||
|
||||
// FieldseekerPoolbuffers contains methods to work with the poolbuffer view
|
||||
var FieldseekerPoolbuffers = psql.NewViewx[*FieldseekerPoolbuffer, FieldseekerPoolbufferSlice]("fieldseeker", "poolbuffer", buildFieldseekerPoolbufferColumns("fieldseeker.poolbuffer"))
|
||||
|
||||
// FieldseekerPoolbuffersQuery is a query on the poolbuffer view
|
||||
type FieldseekerPoolbuffersQuery = *psql.ViewQuery[*FieldseekerPoolbuffer, FieldseekerPoolbufferSlice]
|
||||
|
||||
func buildFieldseekerPoolbufferColumns(alias string) fieldseekerPoolbufferColumns {
|
||||
return fieldseekerPoolbufferColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.poolbuffer"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerPoolbufferColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerPoolbufferColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerPoolbufferColumns) AliasedAs(alias string) fieldseekerPoolbufferColumns {
|
||||
return buildFieldseekerPoolbufferColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerPoolbuffer is retrieved from the database
|
||||
func (o *FieldseekerPoolbuffer) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerPoolbuffers.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPoolbufferSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerPoolbufferSlice is retrieved from the database
|
||||
func (o FieldseekerPoolbufferSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerPoolbuffers.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerPoolbufferWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerPoolbufferWhere[Q]) AliasedAs(alias string) fieldseekerPoolbufferWhere[Q] {
|
||||
return buildFieldseekerPoolbufferWhere[Q](buildFieldseekerPoolbufferColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerPoolbufferWhere[Q psql.Filterable](cols fieldseekerPoolbufferColumns) fieldseekerPoolbufferWhere[Q] {
|
||||
return fieldseekerPoolbufferWhere[Q]{}
|
||||
}
|
||||
681
db/models/fieldseeker.pooldetail.bob.go
Normal file
681
db/models/fieldseeker.pooldetail.bob.go
Normal file
|
|
@ -0,0 +1,681 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerPooldetail is an object representing the database table.
|
||||
type FieldseekerPooldetail struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
// Trap Data ID
|
||||
TrapdataID null.Val[uuid.UUID] `db:"trapdata_id" `
|
||||
// Pool ID
|
||||
PoolID null.Val[uuid.UUID] `db:"pool_id" `
|
||||
// Species
|
||||
Species null.Val[string] `db:"species" `
|
||||
// Females
|
||||
Females null.Val[int16] `db:"females" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerPooldetailSlice is an alias for a slice of pointers to FieldseekerPooldetail.
|
||||
// This should almost always be used instead of []*FieldseekerPooldetail.
|
||||
type FieldseekerPooldetailSlice []*FieldseekerPooldetail
|
||||
|
||||
// FieldseekerPooldetails contains methods to work with the pooldetail table
|
||||
var FieldseekerPooldetails = psql.NewTablex[*FieldseekerPooldetail, FieldseekerPooldetailSlice, *FieldseekerPooldetailSetter]("fieldseeker", "pooldetail", buildFieldseekerPooldetailColumns("fieldseeker.pooldetail"))
|
||||
|
||||
// FieldseekerPooldetailsQuery is a query on the pooldetail table
|
||||
type FieldseekerPooldetailsQuery = *psql.ViewQuery[*FieldseekerPooldetail, FieldseekerPooldetailSlice]
|
||||
|
||||
func buildFieldseekerPooldetailColumns(alias string) fieldseekerPooldetailColumns {
|
||||
return fieldseekerPooldetailColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "trapdata_id", "pool_id", "species", "females", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.pooldetail"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
TrapdataID: psql.Quote(alias, "trapdata_id"),
|
||||
PoolID: psql.Quote(alias, "pool_id"),
|
||||
Species: psql.Quote(alias, "species"),
|
||||
Females: psql.Quote(alias, "females"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerPooldetailColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
TrapdataID psql.Expression
|
||||
PoolID psql.Expression
|
||||
Species psql.Expression
|
||||
Females psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerPooldetailColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerPooldetailColumns) AliasedAs(alias string) fieldseekerPooldetailColumns {
|
||||
return buildFieldseekerPooldetailColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerPooldetailSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerPooldetailSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
TrapdataID omitnull.Val[uuid.UUID] `db:"trapdata_id" `
|
||||
PoolID omitnull.Val[uuid.UUID] `db:"pool_id" `
|
||||
Species omitnull.Val[string] `db:"species" `
|
||||
Females omitnull.Val[int16] `db:"females" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerPooldetailSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.TrapdataID.IsUnset() {
|
||||
vals = append(vals, "trapdata_id")
|
||||
}
|
||||
if !s.PoolID.IsUnset() {
|
||||
vals = append(vals, "pool_id")
|
||||
}
|
||||
if !s.Species.IsUnset() {
|
||||
vals = append(vals, "species")
|
||||
}
|
||||
if !s.Females.IsUnset() {
|
||||
vals = append(vals, "females")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerPooldetailSetter) Overwrite(t *FieldseekerPooldetail) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.TrapdataID.IsUnset() {
|
||||
t.TrapdataID = s.TrapdataID.MustGetNull()
|
||||
}
|
||||
if !s.PoolID.IsUnset() {
|
||||
t.PoolID = s.PoolID.MustGetNull()
|
||||
}
|
||||
if !s.Species.IsUnset() {
|
||||
t.Species = s.Species.MustGetNull()
|
||||
}
|
||||
if !s.Females.IsUnset() {
|
||||
t.Females = s.Females.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerPooldetailSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerPooldetails.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.TrapdataID.IsUnset() {
|
||||
vals[1] = psql.Arg(s.TrapdataID.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.PoolID.IsUnset() {
|
||||
vals[2] = psql.Arg(s.PoolID.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Species.IsUnset() {
|
||||
vals[3] = psql.Arg(s.Species.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Females.IsUnset() {
|
||||
vals[4] = psql.Arg(s.Females.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[5] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[6] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[7] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[8] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[9] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerPooldetailSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerPooldetailSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 14)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.TrapdataID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "trapdata_id")...),
|
||||
psql.Arg(s.TrapdataID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.PoolID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "pool_id")...),
|
||||
psql.Arg(s.PoolID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Species.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "species")...),
|
||||
psql.Arg(s.Species),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Females.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "females")...),
|
||||
psql.Arg(s.Females),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerPooldetail retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerPooldetail(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerPooldetail, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerPooldetails.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerPooldetailExists checks the presence of a single record by primary key
|
||||
func FieldseekerPooldetailExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerPooldetail is retrieved from the database
|
||||
func (o *FieldseekerPooldetail) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerPooldetails.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerPooldetails.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerPooldetails.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerPooldetails.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerPooldetail
|
||||
func (o *FieldseekerPooldetail) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerPooldetail) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.pooldetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerPooldetail
|
||||
func (o *FieldseekerPooldetail) Update(ctx context.Context, exec bob.Executor, s *FieldseekerPooldetailSetter) error {
|
||||
v, err := FieldseekerPooldetails.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerPooldetail record with an executor
|
||||
func (o *FieldseekerPooldetail) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerPooldetails.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerPooldetail using the executor
|
||||
func (o *FieldseekerPooldetail) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerPooldetailSlice is retrieved from the database
|
||||
func (o FieldseekerPooldetailSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerPooldetails.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerPooldetails.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerPooldetails.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerPooldetails.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerPooldetailSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.pooldetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerPooldetailSlice) copyMatchingRows(from ...*FieldseekerPooldetail) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerPooldetailSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerPooldetails.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerPooldetail:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerPooldetail:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerPooldetailSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerPooldetail or a slice of FieldseekerPooldetail
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerPooldetails.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerPooldetailSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerPooldetails.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerPooldetail:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerPooldetail:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerPooldetailSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerPooldetail or a slice of FieldseekerPooldetail
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerPooldetails.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerPooldetailSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerPooldetailSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerPooldetails.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerPooldetailSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerPooldetails.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerPooldetailSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerPooldetails.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerPooldetailWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
TrapdataID psql.WhereNullMod[Q, uuid.UUID]
|
||||
PoolID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Species psql.WhereNullMod[Q, string]
|
||||
Females psql.WhereNullMod[Q, int16]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerPooldetailWhere[Q]) AliasedAs(alias string) fieldseekerPooldetailWhere[Q] {
|
||||
return buildFieldseekerPooldetailWhere[Q](buildFieldseekerPooldetailColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerPooldetailWhere[Q psql.Filterable](cols fieldseekerPooldetailColumns) fieldseekerPooldetailWhere[Q] {
|
||||
return fieldseekerPooldetailWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
TrapdataID: psql.WhereNull[Q, uuid.UUID](cols.TrapdataID),
|
||||
PoolID: psql.WhereNull[Q, uuid.UUID](cols.PoolID),
|
||||
Species: psql.WhereNull[Q, string](cols.Species),
|
||||
Females: psql.WhereNull[Q, int16](cols.Females),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
1177
db/models/fieldseeker.proposedtreatmentarea.bob.go
Normal file
1177
db/models/fieldseeker.proposedtreatmentarea.bob.go
Normal file
File diff suppressed because it is too large
Load diff
79
db/models/fieldseeker.qalarvcount.bob.go
Normal file
79
db/models/fieldseeker.qalarvcount.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerQalarvcount is an object representing the database table.
|
||||
type FieldseekerQalarvcount struct{}
|
||||
|
||||
// FieldseekerQalarvcountSlice is an alias for a slice of pointers to FieldseekerQalarvcount.
|
||||
// This should almost always be used instead of []*FieldseekerQalarvcount.
|
||||
type FieldseekerQalarvcountSlice []*FieldseekerQalarvcount
|
||||
|
||||
// FieldseekerQalarvcounts contains methods to work with the qalarvcount view
|
||||
var FieldseekerQalarvcounts = psql.NewViewx[*FieldseekerQalarvcount, FieldseekerQalarvcountSlice]("fieldseeker", "qalarvcount", buildFieldseekerQalarvcountColumns("fieldseeker.qalarvcount"))
|
||||
|
||||
// FieldseekerQalarvcountsQuery is a query on the qalarvcount view
|
||||
type FieldseekerQalarvcountsQuery = *psql.ViewQuery[*FieldseekerQalarvcount, FieldseekerQalarvcountSlice]
|
||||
|
||||
func buildFieldseekerQalarvcountColumns(alias string) fieldseekerQalarvcountColumns {
|
||||
return fieldseekerQalarvcountColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.qalarvcount"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerQalarvcountColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerQalarvcountColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerQalarvcountColumns) AliasedAs(alias string) fieldseekerQalarvcountColumns {
|
||||
return buildFieldseekerQalarvcountColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerQalarvcount is retrieved from the database
|
||||
func (o *FieldseekerQalarvcount) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerQalarvcounts.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerQalarvcountSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerQalarvcountSlice is retrieved from the database
|
||||
func (o FieldseekerQalarvcountSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerQalarvcounts.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerQalarvcountWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerQalarvcountWhere[Q]) AliasedAs(alias string) fieldseekerQalarvcountWhere[Q] {
|
||||
return buildFieldseekerQalarvcountWhere[Q](buildFieldseekerQalarvcountColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerQalarvcountWhere[Q psql.Filterable](cols fieldseekerQalarvcountColumns) fieldseekerQalarvcountWhere[Q] {
|
||||
return fieldseekerQalarvcountWhere[Q]{}
|
||||
}
|
||||
1920
db/models/fieldseeker.qamosquitoinspection.bob.go
Normal file
1920
db/models/fieldseeker.qamosquitoinspection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
79
db/models/fieldseeker.qaproductobservation.bob.go
Normal file
79
db/models/fieldseeker.qaproductobservation.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerQaproductobservation is an object representing the database table.
|
||||
type FieldseekerQaproductobservation struct{}
|
||||
|
||||
// FieldseekerQaproductobservationSlice is an alias for a slice of pointers to FieldseekerQaproductobservation.
|
||||
// This should almost always be used instead of []*FieldseekerQaproductobservation.
|
||||
type FieldseekerQaproductobservationSlice []*FieldseekerQaproductobservation
|
||||
|
||||
// FieldseekerQaproductobservations contains methods to work with the qaproductobservation view
|
||||
var FieldseekerQaproductobservations = psql.NewViewx[*FieldseekerQaproductobservation, FieldseekerQaproductobservationSlice]("fieldseeker", "qaproductobservation", buildFieldseekerQaproductobservationColumns("fieldseeker.qaproductobservation"))
|
||||
|
||||
// FieldseekerQaproductobservationsQuery is a query on the qaproductobservation view
|
||||
type FieldseekerQaproductobservationsQuery = *psql.ViewQuery[*FieldseekerQaproductobservation, FieldseekerQaproductobservationSlice]
|
||||
|
||||
func buildFieldseekerQaproductobservationColumns(alias string) fieldseekerQaproductobservationColumns {
|
||||
return fieldseekerQaproductobservationColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.qaproductobservation"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerQaproductobservationColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerQaproductobservationColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerQaproductobservationColumns) AliasedAs(alias string) fieldseekerQaproductobservationColumns {
|
||||
return buildFieldseekerQaproductobservationColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerQaproductobservation is retrieved from the database
|
||||
func (o *FieldseekerQaproductobservation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerQaproductobservations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerQaproductobservationSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerQaproductobservationSlice is retrieved from the database
|
||||
func (o FieldseekerQaproductobservationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerQaproductobservations.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerQaproductobservationWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerQaproductobservationWhere[Q]) AliasedAs(alias string) fieldseekerQaproductobservationWhere[Q] {
|
||||
return buildFieldseekerQaproductobservationWhere[Q](buildFieldseekerQaproductobservationColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerQaproductobservationWhere[Q psql.Filterable](cols fieldseekerQaproductobservationColumns) fieldseekerQaproductobservationWhere[Q] {
|
||||
return fieldseekerQaproductobservationWhere[Q]{}
|
||||
}
|
||||
79
db/models/fieldseeker.restrictedarea.bob.go
Normal file
79
db/models/fieldseeker.restrictedarea.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerRestrictedarea is an object representing the database table.
|
||||
type FieldseekerRestrictedarea struct{}
|
||||
|
||||
// FieldseekerRestrictedareaSlice is an alias for a slice of pointers to FieldseekerRestrictedarea.
|
||||
// This should almost always be used instead of []*FieldseekerRestrictedarea.
|
||||
type FieldseekerRestrictedareaSlice []*FieldseekerRestrictedarea
|
||||
|
||||
// FieldseekerRestrictedareas contains methods to work with the restrictedarea view
|
||||
var FieldseekerRestrictedareas = psql.NewViewx[*FieldseekerRestrictedarea, FieldseekerRestrictedareaSlice]("fieldseeker", "restrictedarea", buildFieldseekerRestrictedareaColumns("fieldseeker.restrictedarea"))
|
||||
|
||||
// FieldseekerRestrictedareasQuery is a query on the restrictedarea view
|
||||
type FieldseekerRestrictedareasQuery = *psql.ViewQuery[*FieldseekerRestrictedarea, FieldseekerRestrictedareaSlice]
|
||||
|
||||
func buildFieldseekerRestrictedareaColumns(alias string) fieldseekerRestrictedareaColumns {
|
||||
return fieldseekerRestrictedareaColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.restrictedarea"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerRestrictedareaColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerRestrictedareaColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerRestrictedareaColumns) AliasedAs(alias string) fieldseekerRestrictedareaColumns {
|
||||
return buildFieldseekerRestrictedareaColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerRestrictedarea is retrieved from the database
|
||||
func (o *FieldseekerRestrictedarea) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerRestrictedareas.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerRestrictedareaSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerRestrictedareaSlice is retrieved from the database
|
||||
func (o FieldseekerRestrictedareaSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerRestrictedareas.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerRestrictedareaWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerRestrictedareaWhere[Q]) AliasedAs(alias string) fieldseekerRestrictedareaWhere[Q] {
|
||||
return buildFieldseekerRestrictedareaWhere[Q](buildFieldseekerRestrictedareaColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerRestrictedareaWhere[Q psql.Filterable](cols fieldseekerRestrictedareaColumns) fieldseekerRestrictedareaWhere[Q] {
|
||||
return fieldseekerRestrictedareaWhere[Q]{}
|
||||
}
|
||||
79
db/models/fieldseeker.rodentinspection.bob.go
Normal file
79
db/models/fieldseeker.rodentinspection.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerRodentinspection is an object representing the database table.
|
||||
type FieldseekerRodentinspection struct{}
|
||||
|
||||
// FieldseekerRodentinspectionSlice is an alias for a slice of pointers to FieldseekerRodentinspection.
|
||||
// This should almost always be used instead of []*FieldseekerRodentinspection.
|
||||
type FieldseekerRodentinspectionSlice []*FieldseekerRodentinspection
|
||||
|
||||
// FieldseekerRodentinspections contains methods to work with the rodentinspection view
|
||||
var FieldseekerRodentinspections = psql.NewViewx[*FieldseekerRodentinspection, FieldseekerRodentinspectionSlice]("fieldseeker", "rodentinspection", buildFieldseekerRodentinspectionColumns("fieldseeker.rodentinspection"))
|
||||
|
||||
// FieldseekerRodentinspectionsQuery is a query on the rodentinspection view
|
||||
type FieldseekerRodentinspectionsQuery = *psql.ViewQuery[*FieldseekerRodentinspection, FieldseekerRodentinspectionSlice]
|
||||
|
||||
func buildFieldseekerRodentinspectionColumns(alias string) fieldseekerRodentinspectionColumns {
|
||||
return fieldseekerRodentinspectionColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.rodentinspection"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerRodentinspectionColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerRodentinspectionColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerRodentinspectionColumns) AliasedAs(alias string) fieldseekerRodentinspectionColumns {
|
||||
return buildFieldseekerRodentinspectionColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerRodentinspection is retrieved from the database
|
||||
func (o *FieldseekerRodentinspection) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerRodentinspections.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerRodentinspectionSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerRodentinspectionSlice is retrieved from the database
|
||||
func (o FieldseekerRodentinspectionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerRodentinspections.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerRodentinspectionWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerRodentinspectionWhere[Q]) AliasedAs(alias string) fieldseekerRodentinspectionWhere[Q] {
|
||||
return buildFieldseekerRodentinspectionWhere[Q](buildFieldseekerRodentinspectionColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerRodentinspectionWhere[Q psql.Filterable](cols fieldseekerRodentinspectionColumns) fieldseekerRodentinspectionWhere[Q] {
|
||||
return fieldseekerRodentinspectionWhere[Q]{}
|
||||
}
|
||||
1340
db/models/fieldseeker.rodentlocation.bob.go
Normal file
1340
db/models/fieldseeker.rodentlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1512
db/models/fieldseeker.samplecollection.bob.go
Normal file
1512
db/models/fieldseeker.samplecollection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
941
db/models/fieldseeker.samplelocation.bob.go
Normal file
941
db/models/fieldseeker.samplelocation.bob.go
Normal file
|
|
@ -0,0 +1,941 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerSamplelocation is an object representing the database table.
|
||||
type FieldseekerSamplelocation struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
// Name
|
||||
Name null.Val[string] `db:"name" `
|
||||
// Zone
|
||||
Zone null.Val[string] `db:"zone" `
|
||||
// Habitat
|
||||
Habitat null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] `db:"habitat" `
|
||||
// Priority
|
||||
Priority null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] `db:"priority" `
|
||||
// Use Type
|
||||
Usetype null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] `db:"usetype" `
|
||||
// Active
|
||||
Active null.Val[enums.FieldseekerSamplelocationNotinuitFEnum] `db:"active" `
|
||||
// Description
|
||||
Description null.Val[string] `db:"description" `
|
||||
// Access Description
|
||||
Accessdesc null.Val[string] `db:"accessdesc" `
|
||||
// Comments
|
||||
Comments null.Val[string] `db:"comments" `
|
||||
// External ID
|
||||
Externalid null.Val[string] `db:"externalid" `
|
||||
// Next Scheduled Action
|
||||
Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" `
|
||||
// Zone2
|
||||
Zone2 null.Val[string] `db:"zone2" `
|
||||
Locationnumber null.Val[int32] `db:"locationnumber" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
// Gateway Sync
|
||||
Gatewaysync null.Val[int16] `db:"gatewaysync" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
// FieldseekerSamplelocationSlice is an alias for a slice of pointers to FieldseekerSamplelocation.
|
||||
// This should almost always be used instead of []*FieldseekerSamplelocation.
|
||||
type FieldseekerSamplelocationSlice []*FieldseekerSamplelocation
|
||||
|
||||
// FieldseekerSamplelocations contains methods to work with the samplelocation table
|
||||
var FieldseekerSamplelocations = psql.NewTablex[*FieldseekerSamplelocation, FieldseekerSamplelocationSlice, *FieldseekerSamplelocationSetter]("fieldseeker", "samplelocation", buildFieldseekerSamplelocationColumns("fieldseeker.samplelocation"))
|
||||
|
||||
// FieldseekerSamplelocationsQuery is a query on the samplelocation table
|
||||
type FieldseekerSamplelocationsQuery = *psql.ViewQuery[*FieldseekerSamplelocation, FieldseekerSamplelocationSlice]
|
||||
|
||||
func buildFieldseekerSamplelocationColumns(alias string) fieldseekerSamplelocationColumns {
|
||||
return fieldseekerSamplelocationColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "name", "zone", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "externalid", "nextactiondatescheduled", "zone2", "locationnumber", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "gatewaysync", "creationdate", "creator", "editdate", "editor",
|
||||
).WithParent("fieldseeker.samplelocation"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Name: psql.Quote(alias, "name"),
|
||||
Zone: psql.Quote(alias, "zone"),
|
||||
Habitat: psql.Quote(alias, "habitat"),
|
||||
Priority: psql.Quote(alias, "priority"),
|
||||
Usetype: psql.Quote(alias, "usetype"),
|
||||
Active: psql.Quote(alias, "active"),
|
||||
Description: psql.Quote(alias, "description"),
|
||||
Accessdesc: psql.Quote(alias, "accessdesc"),
|
||||
Comments: psql.Quote(alias, "comments"),
|
||||
Externalid: psql.Quote(alias, "externalid"),
|
||||
Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"),
|
||||
Zone2: psql.Quote(alias, "zone2"),
|
||||
Locationnumber: psql.Quote(alias, "locationnumber"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Gatewaysync: psql.Quote(alias, "gatewaysync"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerSamplelocationColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Name psql.Expression
|
||||
Zone psql.Expression
|
||||
Habitat psql.Expression
|
||||
Priority psql.Expression
|
||||
Usetype psql.Expression
|
||||
Active psql.Expression
|
||||
Description psql.Expression
|
||||
Accessdesc psql.Expression
|
||||
Comments psql.Expression
|
||||
Externalid psql.Expression
|
||||
Nextactiondatescheduled psql.Expression
|
||||
Zone2 psql.Expression
|
||||
Locationnumber psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Gatewaysync psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerSamplelocationColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerSamplelocationColumns) AliasedAs(alias string) fieldseekerSamplelocationColumns {
|
||||
return buildFieldseekerSamplelocationColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerSamplelocationSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerSamplelocationSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Habitat omitnull.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] `db:"habitat" `
|
||||
Priority omitnull.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] `db:"priority" `
|
||||
Usetype omitnull.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] `db:"usetype" `
|
||||
Active omitnull.Val[enums.FieldseekerSamplelocationNotinuitFEnum] `db:"active" `
|
||||
Description omitnull.Val[string] `db:"description" `
|
||||
Accessdesc omitnull.Val[string] `db:"accessdesc" `
|
||||
Comments omitnull.Val[string] `db:"comments" `
|
||||
Externalid omitnull.Val[string] `db:"externalid" `
|
||||
Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Locationnumber omitnull.Val[int32] `db:"locationnumber" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Gatewaysync omitnull.Val[int16] `db:"gatewaysync" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
}
|
||||
|
||||
func (s FieldseekerSamplelocationSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 24)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Name.IsUnset() {
|
||||
vals = append(vals, "name")
|
||||
}
|
||||
if !s.Zone.IsUnset() {
|
||||
vals = append(vals, "zone")
|
||||
}
|
||||
if !s.Habitat.IsUnset() {
|
||||
vals = append(vals, "habitat")
|
||||
}
|
||||
if !s.Priority.IsUnset() {
|
||||
vals = append(vals, "priority")
|
||||
}
|
||||
if !s.Usetype.IsUnset() {
|
||||
vals = append(vals, "usetype")
|
||||
}
|
||||
if !s.Active.IsUnset() {
|
||||
vals = append(vals, "active")
|
||||
}
|
||||
if !s.Description.IsUnset() {
|
||||
vals = append(vals, "description")
|
||||
}
|
||||
if !s.Accessdesc.IsUnset() {
|
||||
vals = append(vals, "accessdesc")
|
||||
}
|
||||
if !s.Comments.IsUnset() {
|
||||
vals = append(vals, "comments")
|
||||
}
|
||||
if !s.Externalid.IsUnset() {
|
||||
vals = append(vals, "externalid")
|
||||
}
|
||||
if !s.Nextactiondatescheduled.IsUnset() {
|
||||
vals = append(vals, "nextactiondatescheduled")
|
||||
}
|
||||
if !s.Zone2.IsUnset() {
|
||||
vals = append(vals, "zone2")
|
||||
}
|
||||
if !s.Locationnumber.IsUnset() {
|
||||
vals = append(vals, "locationnumber")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Gatewaysync.IsUnset() {
|
||||
vals = append(vals, "gatewaysync")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerSamplelocationSetter) Overwrite(t *FieldseekerSamplelocation) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Name.IsUnset() {
|
||||
t.Name = s.Name.MustGetNull()
|
||||
}
|
||||
if !s.Zone.IsUnset() {
|
||||
t.Zone = s.Zone.MustGetNull()
|
||||
}
|
||||
if !s.Habitat.IsUnset() {
|
||||
t.Habitat = s.Habitat.MustGetNull()
|
||||
}
|
||||
if !s.Priority.IsUnset() {
|
||||
t.Priority = s.Priority.MustGetNull()
|
||||
}
|
||||
if !s.Usetype.IsUnset() {
|
||||
t.Usetype = s.Usetype.MustGetNull()
|
||||
}
|
||||
if !s.Active.IsUnset() {
|
||||
t.Active = s.Active.MustGetNull()
|
||||
}
|
||||
if !s.Description.IsUnset() {
|
||||
t.Description = s.Description.MustGetNull()
|
||||
}
|
||||
if !s.Accessdesc.IsUnset() {
|
||||
t.Accessdesc = s.Accessdesc.MustGetNull()
|
||||
}
|
||||
if !s.Comments.IsUnset() {
|
||||
t.Comments = s.Comments.MustGetNull()
|
||||
}
|
||||
if !s.Externalid.IsUnset() {
|
||||
t.Externalid = s.Externalid.MustGetNull()
|
||||
}
|
||||
if !s.Nextactiondatescheduled.IsUnset() {
|
||||
t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull()
|
||||
}
|
||||
if !s.Zone2.IsUnset() {
|
||||
t.Zone2 = s.Zone2.MustGetNull()
|
||||
}
|
||||
if !s.Locationnumber.IsUnset() {
|
||||
t.Locationnumber = s.Locationnumber.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Gatewaysync.IsUnset() {
|
||||
t.Gatewaysync = s.Gatewaysync.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerSamplelocationSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerSamplelocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 24)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Name.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Name.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Zone.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Zone.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Habitat.IsUnset() {
|
||||
vals[3] = psql.Arg(s.Habitat.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Priority.IsUnset() {
|
||||
vals[4] = psql.Arg(s.Priority.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Usetype.IsUnset() {
|
||||
vals[5] = psql.Arg(s.Usetype.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Active.IsUnset() {
|
||||
vals[6] = psql.Arg(s.Active.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Description.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Description.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Accessdesc.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Accessdesc.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Comments.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Comments.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Externalid.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Externalid.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Nextactiondatescheduled.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Nextactiondatescheduled.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Zone2.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Zone2.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Locationnumber.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Locationnumber.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[14] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[14] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[15] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[15] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[16] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[16] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[17] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[17] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[18] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[18] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Gatewaysync.IsUnset() {
|
||||
vals[19] = psql.Arg(s.Gatewaysync.MustGetNull())
|
||||
} else {
|
||||
vals[19] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[20] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[20] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[21] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[21] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[22] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[22] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[23] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[23] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerSamplelocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerSamplelocationSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 24)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Name.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "name")...),
|
||||
psql.Arg(s.Name),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Zone.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "zone")...),
|
||||
psql.Arg(s.Zone),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Habitat.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "habitat")...),
|
||||
psql.Arg(s.Habitat),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Priority.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "priority")...),
|
||||
psql.Arg(s.Priority),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Usetype.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "usetype")...),
|
||||
psql.Arg(s.Usetype),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Active.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "active")...),
|
||||
psql.Arg(s.Active),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Description.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "description")...),
|
||||
psql.Arg(s.Description),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Accessdesc.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "accessdesc")...),
|
||||
psql.Arg(s.Accessdesc),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Comments.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "comments")...),
|
||||
psql.Arg(s.Comments),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Externalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "externalid")...),
|
||||
psql.Arg(s.Externalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Nextactiondatescheduled.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "nextactiondatescheduled")...),
|
||||
psql.Arg(s.Nextactiondatescheduled),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Zone2.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "zone2")...),
|
||||
psql.Arg(s.Zone2),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Locationnumber.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "locationnumber")...),
|
||||
psql.Arg(s.Locationnumber),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Gatewaysync.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "gatewaysync")...),
|
||||
psql.Arg(s.Gatewaysync),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerSamplelocation retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerSamplelocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerSamplelocation, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerSamplelocations.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerSamplelocationExists checks the presence of a single record by primary key
|
||||
func FieldseekerSamplelocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerSamplelocation is retrieved from the database
|
||||
func (o *FieldseekerSamplelocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerSamplelocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerSamplelocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerSamplelocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerSamplelocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerSamplelocation
|
||||
func (o *FieldseekerSamplelocation) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerSamplelocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.samplelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerSamplelocation
|
||||
func (o *FieldseekerSamplelocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerSamplelocationSetter) error {
|
||||
v, err := FieldseekerSamplelocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerSamplelocation record with an executor
|
||||
func (o *FieldseekerSamplelocation) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerSamplelocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerSamplelocation using the executor
|
||||
func (o *FieldseekerSamplelocation) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerSamplelocationSlice is retrieved from the database
|
||||
func (o FieldseekerSamplelocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerSamplelocations.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerSamplelocations.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerSamplelocations.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerSamplelocations.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerSamplelocationSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.samplelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerSamplelocationSlice) copyMatchingRows(from ...*FieldseekerSamplelocation) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerSamplelocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerSamplelocations.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerSamplelocation:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerSamplelocation:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerSamplelocationSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerSamplelocation or a slice of FieldseekerSamplelocation
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerSamplelocations.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerSamplelocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerSamplelocations.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerSamplelocation:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerSamplelocation:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerSamplelocationSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerSamplelocation or a slice of FieldseekerSamplelocation
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerSamplelocations.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerSamplelocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerSamplelocationSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerSamplelocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerSamplelocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerSamplelocations.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerSamplelocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerSamplelocations.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerSamplelocationWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Name psql.WhereNullMod[Q, string]
|
||||
Zone psql.WhereNullMod[Q, string]
|
||||
Habitat psql.WhereNullMod[Q, enums.FieldseekerSamplelocationLocationhabitattypeEnum]
|
||||
Priority psql.WhereNullMod[Q, enums.FieldseekerSamplelocationLocationpriorityEnum]
|
||||
Usetype psql.WhereNullMod[Q, enums.FieldseekerSamplelocationSamplelocationusetypeEnum]
|
||||
Active psql.WhereNullMod[Q, enums.FieldseekerSamplelocationNotinuitFEnum]
|
||||
Description psql.WhereNullMod[Q, string]
|
||||
Accessdesc psql.WhereNullMod[Q, string]
|
||||
Comments psql.WhereNullMod[Q, string]
|
||||
Externalid psql.WhereNullMod[Q, string]
|
||||
Nextactiondatescheduled psql.WhereNullMod[Q, time.Time]
|
||||
Zone2 psql.WhereNullMod[Q, string]
|
||||
Locationnumber psql.WhereNullMod[Q, int32]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Gatewaysync psql.WhereNullMod[Q, int16]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerSamplelocationWhere[Q]) AliasedAs(alias string) fieldseekerSamplelocationWhere[Q] {
|
||||
return buildFieldseekerSamplelocationWhere[Q](buildFieldseekerSamplelocationColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerSamplelocationWhere[Q psql.Filterable](cols fieldseekerSamplelocationColumns) fieldseekerSamplelocationWhere[Q] {
|
||||
return fieldseekerSamplelocationWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Name: psql.WhereNull[Q, string](cols.Name),
|
||||
Zone: psql.WhereNull[Q, string](cols.Zone),
|
||||
Habitat: psql.WhereNull[Q, enums.FieldseekerSamplelocationLocationhabitattypeEnum](cols.Habitat),
|
||||
Priority: psql.WhereNull[Q, enums.FieldseekerSamplelocationLocationpriorityEnum](cols.Priority),
|
||||
Usetype: psql.WhereNull[Q, enums.FieldseekerSamplelocationSamplelocationusetypeEnum](cols.Usetype),
|
||||
Active: psql.WhereNull[Q, enums.FieldseekerSamplelocationNotinuitFEnum](cols.Active),
|
||||
Description: psql.WhereNull[Q, string](cols.Description),
|
||||
Accessdesc: psql.WhereNull[Q, string](cols.Accessdesc),
|
||||
Comments: psql.WhereNull[Q, string](cols.Comments),
|
||||
Externalid: psql.WhereNull[Q, string](cols.Externalid),
|
||||
Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled),
|
||||
Zone2: psql.WhereNull[Q, string](cols.Zone2),
|
||||
Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Gatewaysync: psql.WhereNull[Q, int16](cols.Gatewaysync),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
}
|
||||
}
|
||||
2553
db/models/fieldseeker.servicerequest.bob.go
Normal file
2553
db/models/fieldseeker.servicerequest.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1066
db/models/fieldseeker.speciesabundance.bob.go
Normal file
1066
db/models/fieldseeker.speciesabundance.bob.go
Normal file
File diff suppressed because it is too large
Load diff
807
db/models/fieldseeker.stormdrain.bob.go
Normal file
807
db/models/fieldseeker.stormdrain.bob.go
Normal file
|
|
@ -0,0 +1,807 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerStormdrain is an object representing the database table.
|
||||
type FieldseekerStormdrain struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Nexttreatmentdate null.Val[time.Time] `db:"nexttreatmentdate" `
|
||||
Lasttreatdate null.Val[time.Time] `db:"lasttreatdate" `
|
||||
Lastaction null.Val[string] `db:"lastaction" `
|
||||
Symbology null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] `db:"symbology" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Laststatus null.Val[string] `db:"laststatus" `
|
||||
// Zone
|
||||
Zone null.Val[string] `db:"zone" `
|
||||
// Zone2
|
||||
Zone2 null.Val[string] `db:"zone2" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
// Type
|
||||
Type null.Val[string] `db:"type" `
|
||||
// Jurisdiction
|
||||
Jurisdiction null.Val[string] `db:"jurisdiction" `
|
||||
}
|
||||
|
||||
// FieldseekerStormdrainSlice is an alias for a slice of pointers to FieldseekerStormdrain.
|
||||
// This should almost always be used instead of []*FieldseekerStormdrain.
|
||||
type FieldseekerStormdrainSlice []*FieldseekerStormdrain
|
||||
|
||||
// FieldseekerStormdrains contains methods to work with the stormdrain table
|
||||
var FieldseekerStormdrains = psql.NewTablex[*FieldseekerStormdrain, FieldseekerStormdrainSlice, *FieldseekerStormdrainSetter]("fieldseeker", "stormdrain", buildFieldseekerStormdrainColumns("fieldseeker.stormdrain"))
|
||||
|
||||
// FieldseekerStormdrainsQuery is a query on the stormdrain table
|
||||
type FieldseekerStormdrainsQuery = *psql.ViewQuery[*FieldseekerStormdrain, FieldseekerStormdrainSlice]
|
||||
|
||||
func buildFieldseekerStormdrainColumns(alias string) fieldseekerStormdrainColumns {
|
||||
return fieldseekerStormdrainColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "nexttreatmentdate", "lasttreatdate", "lastaction", "symbology", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "laststatus", "zone", "zone2", "creationdate", "creator", "editdate", "editor", "type", "jurisdiction",
|
||||
).WithParent("fieldseeker.stormdrain"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Nexttreatmentdate: psql.Quote(alias, "nexttreatmentdate"),
|
||||
Lasttreatdate: psql.Quote(alias, "lasttreatdate"),
|
||||
Lastaction: psql.Quote(alias, "lastaction"),
|
||||
Symbology: psql.Quote(alias, "symbology"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Laststatus: psql.Quote(alias, "laststatus"),
|
||||
Zone: psql.Quote(alias, "zone"),
|
||||
Zone2: psql.Quote(alias, "zone2"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
Type: psql.Quote(alias, "type"),
|
||||
Jurisdiction: psql.Quote(alias, "jurisdiction"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerStormdrainColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Nexttreatmentdate psql.Expression
|
||||
Lasttreatdate psql.Expression
|
||||
Lastaction psql.Expression
|
||||
Symbology psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Laststatus psql.Expression
|
||||
Zone psql.Expression
|
||||
Zone2 psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
Type psql.Expression
|
||||
Jurisdiction psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerStormdrainColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerStormdrainColumns) AliasedAs(alias string) fieldseekerStormdrainColumns {
|
||||
return buildFieldseekerStormdrainColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerStormdrainSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerStormdrainSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Nexttreatmentdate omitnull.Val[time.Time] `db:"nexttreatmentdate" `
|
||||
Lasttreatdate omitnull.Val[time.Time] `db:"lasttreatdate" `
|
||||
Lastaction omitnull.Val[string] `db:"lastaction" `
|
||||
Symbology omitnull.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] `db:"symbology" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Laststatus omitnull.Val[string] `db:"laststatus" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
Type omitnull.Val[string] `db:"type" `
|
||||
Jurisdiction omitnull.Val[string] `db:"jurisdiction" `
|
||||
}
|
||||
|
||||
func (s FieldseekerStormdrainSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 19)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Nexttreatmentdate.IsUnset() {
|
||||
vals = append(vals, "nexttreatmentdate")
|
||||
}
|
||||
if !s.Lasttreatdate.IsUnset() {
|
||||
vals = append(vals, "lasttreatdate")
|
||||
}
|
||||
if !s.Lastaction.IsUnset() {
|
||||
vals = append(vals, "lastaction")
|
||||
}
|
||||
if !s.Symbology.IsUnset() {
|
||||
vals = append(vals, "symbology")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Laststatus.IsUnset() {
|
||||
vals = append(vals, "laststatus")
|
||||
}
|
||||
if !s.Zone.IsUnset() {
|
||||
vals = append(vals, "zone")
|
||||
}
|
||||
if !s.Zone2.IsUnset() {
|
||||
vals = append(vals, "zone2")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
if !s.Type.IsUnset() {
|
||||
vals = append(vals, "type")
|
||||
}
|
||||
if !s.Jurisdiction.IsUnset() {
|
||||
vals = append(vals, "jurisdiction")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerStormdrainSetter) Overwrite(t *FieldseekerStormdrain) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Nexttreatmentdate.IsUnset() {
|
||||
t.Nexttreatmentdate = s.Nexttreatmentdate.MustGetNull()
|
||||
}
|
||||
if !s.Lasttreatdate.IsUnset() {
|
||||
t.Lasttreatdate = s.Lasttreatdate.MustGetNull()
|
||||
}
|
||||
if !s.Lastaction.IsUnset() {
|
||||
t.Lastaction = s.Lastaction.MustGetNull()
|
||||
}
|
||||
if !s.Symbology.IsUnset() {
|
||||
t.Symbology = s.Symbology.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Laststatus.IsUnset() {
|
||||
t.Laststatus = s.Laststatus.MustGetNull()
|
||||
}
|
||||
if !s.Zone.IsUnset() {
|
||||
t.Zone = s.Zone.MustGetNull()
|
||||
}
|
||||
if !s.Zone2.IsUnset() {
|
||||
t.Zone2 = s.Zone2.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
if !s.Type.IsUnset() {
|
||||
t.Type = s.Type.MustGetNull()
|
||||
}
|
||||
if !s.Jurisdiction.IsUnset() {
|
||||
t.Jurisdiction = s.Jurisdiction.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerStormdrainSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerStormdrains.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 19)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Nexttreatmentdate.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Nexttreatmentdate.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Lasttreatdate.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Lasttreatdate.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Lastaction.IsUnset() {
|
||||
vals[3] = psql.Arg(s.Lastaction.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Symbology.IsUnset() {
|
||||
vals[4] = psql.Arg(s.Symbology.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[5] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[6] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[7] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[8] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[9] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Laststatus.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Laststatus.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Zone.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Zone.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Zone2.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Zone2.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[14] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[14] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[15] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[15] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[16] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[16] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Type.IsUnset() {
|
||||
vals[17] = psql.Arg(s.Type.MustGetNull())
|
||||
} else {
|
||||
vals[17] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Jurisdiction.IsUnset() {
|
||||
vals[18] = psql.Arg(s.Jurisdiction.MustGetNull())
|
||||
} else {
|
||||
vals[18] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerStormdrainSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerStormdrainSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 19)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Nexttreatmentdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "nexttreatmentdate")...),
|
||||
psql.Arg(s.Nexttreatmentdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Lasttreatdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "lasttreatdate")...),
|
||||
psql.Arg(s.Lasttreatdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Lastaction.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "lastaction")...),
|
||||
psql.Arg(s.Lastaction),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Symbology.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "symbology")...),
|
||||
psql.Arg(s.Symbology),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Laststatus.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "laststatus")...),
|
||||
psql.Arg(s.Laststatus),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Zone.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "zone")...),
|
||||
psql.Arg(s.Zone),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Zone2.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "zone2")...),
|
||||
psql.Arg(s.Zone2),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Type.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "type")...),
|
||||
psql.Arg(s.Type),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Jurisdiction.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "jurisdiction")...),
|
||||
psql.Arg(s.Jurisdiction),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerStormdrain retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerStormdrain(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerStormdrain, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerStormdrains.Query(
|
||||
sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerStormdrains.Query(
|
||||
sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerStormdrains.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerStormdrainExists checks the presence of a single record by primary key
|
||||
func FieldseekerStormdrainExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerStormdrains.Query(
|
||||
sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerStormdrain is retrieved from the database
|
||||
func (o *FieldseekerStormdrain) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerStormdrains.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerStormdrains.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerStormdrains.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerStormdrains.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerStormdrain
|
||||
func (o *FieldseekerStormdrain) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerStormdrain) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.stormdrain", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerStormdrain
|
||||
func (o *FieldseekerStormdrain) Update(ctx context.Context, exec bob.Executor, s *FieldseekerStormdrainSetter) error {
|
||||
v, err := FieldseekerStormdrains.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerStormdrain record with an executor
|
||||
func (o *FieldseekerStormdrain) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerStormdrains.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerStormdrain using the executor
|
||||
func (o *FieldseekerStormdrain) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerStormdrains.Query(
|
||||
sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerStormdrainSlice is retrieved from the database
|
||||
func (o FieldseekerStormdrainSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerStormdrains.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerStormdrains.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerStormdrains.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerStormdrains.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerStormdrainSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.stormdrain", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerStormdrainSlice) copyMatchingRows(from ...*FieldseekerStormdrain) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerStormdrainSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerStormdrains.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerStormdrain:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerStormdrain:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerStormdrainSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerStormdrain or a slice of FieldseekerStormdrain
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerStormdrains.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerStormdrainSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerStormdrains.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerStormdrain:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerStormdrain:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerStormdrainSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerStormdrain or a slice of FieldseekerStormdrain
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerStormdrains.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerStormdrainSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerStormdrainSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerStormdrains.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerStormdrainSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerStormdrains.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerStormdrainSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerStormdrains.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerStormdrainWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Nexttreatmentdate psql.WhereNullMod[Q, time.Time]
|
||||
Lasttreatdate psql.WhereNullMod[Q, time.Time]
|
||||
Lastaction psql.WhereNullMod[Q, string]
|
||||
Symbology psql.WhereNullMod[Q, enums.FieldseekerStormdrainStormdrainsymbologyEnum]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Laststatus psql.WhereNullMod[Q, string]
|
||||
Zone psql.WhereNullMod[Q, string]
|
||||
Zone2 psql.WhereNullMod[Q, string]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
Type psql.WhereNullMod[Q, string]
|
||||
Jurisdiction psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (fieldseekerStormdrainWhere[Q]) AliasedAs(alias string) fieldseekerStormdrainWhere[Q] {
|
||||
return buildFieldseekerStormdrainWhere[Q](buildFieldseekerStormdrainColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerStormdrainWhere[Q psql.Filterable](cols fieldseekerStormdrainColumns) fieldseekerStormdrainWhere[Q] {
|
||||
return fieldseekerStormdrainWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Nexttreatmentdate: psql.WhereNull[Q, time.Time](cols.Nexttreatmentdate),
|
||||
Lasttreatdate: psql.WhereNull[Q, time.Time](cols.Lasttreatdate),
|
||||
Lastaction: psql.WhereNull[Q, string](cols.Lastaction),
|
||||
Symbology: psql.WhereNull[Q, enums.FieldseekerStormdrainStormdrainsymbologyEnum](cols.Symbology),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Laststatus: psql.WhereNull[Q, string](cols.Laststatus),
|
||||
Zone: psql.WhereNull[Q, string](cols.Zone),
|
||||
Zone2: psql.WhereNull[Q, string](cols.Zone2),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
Type: psql.WhereNull[Q, string](cols.Type),
|
||||
Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction),
|
||||
}
|
||||
}
|
||||
1037
db/models/fieldseeker.timecard.bob.go
Normal file
1037
db/models/fieldseeker.timecard.bob.go
Normal file
File diff suppressed because it is too large
Load diff
79
db/models/fieldseeker.tracklog.bob.go
Normal file
79
db/models/fieldseeker.tracklog.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerTracklog is an object representing the database table.
|
||||
type FieldseekerTracklog struct{}
|
||||
|
||||
// FieldseekerTracklogSlice is an alias for a slice of pointers to FieldseekerTracklog.
|
||||
// This should almost always be used instead of []*FieldseekerTracklog.
|
||||
type FieldseekerTracklogSlice []*FieldseekerTracklog
|
||||
|
||||
// FieldseekerTracklogs contains methods to work with the tracklog view
|
||||
var FieldseekerTracklogs = psql.NewViewx[*FieldseekerTracklog, FieldseekerTracklogSlice]("fieldseeker", "tracklog", buildFieldseekerTracklogColumns("fieldseeker.tracklog"))
|
||||
|
||||
// FieldseekerTracklogsQuery is a query on the tracklog view
|
||||
type FieldseekerTracklogsQuery = *psql.ViewQuery[*FieldseekerTracklog, FieldseekerTracklogSlice]
|
||||
|
||||
func buildFieldseekerTracklogColumns(alias string) fieldseekerTracklogColumns {
|
||||
return fieldseekerTracklogColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.tracklog"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerTracklogColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerTracklogColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerTracklogColumns) AliasedAs(alias string) fieldseekerTracklogColumns {
|
||||
return buildFieldseekerTracklogColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerTracklog is retrieved from the database
|
||||
func (o *FieldseekerTracklog) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerTracklogs.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTracklogSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerTracklogSlice is retrieved from the database
|
||||
func (o FieldseekerTracklogSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerTracklogs.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerTracklogWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerTracklogWhere[Q]) AliasedAs(alias string) fieldseekerTracklogWhere[Q] {
|
||||
return buildFieldseekerTracklogWhere[Q](buildFieldseekerTracklogColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerTracklogWhere[Q psql.Filterable](cols fieldseekerTracklogColumns) fieldseekerTracklogWhere[Q] {
|
||||
return fieldseekerTracklogWhere[Q]{}
|
||||
}
|
||||
1400
db/models/fieldseeker.trapdata.bob.go
Normal file
1400
db/models/fieldseeker.trapdata.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1094
db/models/fieldseeker.traplocation.bob.go
Normal file
1094
db/models/fieldseeker.traplocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1716
db/models/fieldseeker.treatment.bob.go
Normal file
1716
db/models/fieldseeker.treatment.bob.go
Normal file
File diff suppressed because it is too large
Load diff
778
db/models/fieldseeker.treatmentarea.bob.go
Normal file
778
db/models/fieldseeker.treatmentarea.bob.go
Normal file
|
|
@ -0,0 +1,778 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerTreatmentarea is an object representing the database table.
|
||||
type FieldseekerTreatmentarea struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
TreatID null.Val[uuid.UUID] `db:"treat_id" `
|
||||
SessionID null.Val[uuid.UUID] `db:"session_id" `
|
||||
// Treatment Date
|
||||
Treatdate null.Val[time.Time] `db:"treatdate" `
|
||||
Comments null.Val[string] `db:"comments" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Notified null.Val[int16] `db:"notified" `
|
||||
Type null.Val[string] `db:"type" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
ShapeArea null.Val[float64] `db:"shape__area" `
|
||||
ShapeLength null.Val[float64] `db:"shape__length" `
|
||||
}
|
||||
|
||||
// FieldseekerTreatmentareaSlice is an alias for a slice of pointers to FieldseekerTreatmentarea.
|
||||
// This should almost always be used instead of []*FieldseekerTreatmentarea.
|
||||
type FieldseekerTreatmentareaSlice []*FieldseekerTreatmentarea
|
||||
|
||||
// FieldseekerTreatmentareas contains methods to work with the treatmentarea table
|
||||
var FieldseekerTreatmentareas = psql.NewTablex[*FieldseekerTreatmentarea, FieldseekerTreatmentareaSlice, *FieldseekerTreatmentareaSetter]("fieldseeker", "treatmentarea", buildFieldseekerTreatmentareaColumns("fieldseeker.treatmentarea"))
|
||||
|
||||
// FieldseekerTreatmentareasQuery is a query on the treatmentarea table
|
||||
type FieldseekerTreatmentareasQuery = *psql.ViewQuery[*FieldseekerTreatmentarea, FieldseekerTreatmentareaSlice]
|
||||
|
||||
func buildFieldseekerTreatmentareaColumns(alias string) fieldseekerTreatmentareaColumns {
|
||||
return fieldseekerTreatmentareaColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "treat_id", "session_id", "treatdate", "comments", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "notified", "type", "creationdate", "creator", "editdate", "editor", "shape__area", "shape__length",
|
||||
).WithParent("fieldseeker.treatmentarea"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
TreatID: psql.Quote(alias, "treat_id"),
|
||||
SessionID: psql.Quote(alias, "session_id"),
|
||||
Treatdate: psql.Quote(alias, "treatdate"),
|
||||
Comments: psql.Quote(alias, "comments"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Notified: psql.Quote(alias, "notified"),
|
||||
Type: psql.Quote(alias, "type"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
ShapeArea: psql.Quote(alias, "shape__area"),
|
||||
ShapeLength: psql.Quote(alias, "shape__length"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerTreatmentareaColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
TreatID psql.Expression
|
||||
SessionID psql.Expression
|
||||
Treatdate psql.Expression
|
||||
Comments psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Notified psql.Expression
|
||||
Type psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
ShapeArea psql.Expression
|
||||
ShapeLength psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerTreatmentareaColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerTreatmentareaColumns) AliasedAs(alias string) fieldseekerTreatmentareaColumns {
|
||||
return buildFieldseekerTreatmentareaColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerTreatmentareaSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerTreatmentareaSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
TreatID omitnull.Val[uuid.UUID] `db:"treat_id" `
|
||||
SessionID omitnull.Val[uuid.UUID] `db:"session_id" `
|
||||
Treatdate omitnull.Val[time.Time] `db:"treatdate" `
|
||||
Comments omitnull.Val[string] `db:"comments" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Notified omitnull.Val[int16] `db:"notified" `
|
||||
Type omitnull.Val[string] `db:"type" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
ShapeArea omitnull.Val[float64] `db:"shape__area" `
|
||||
ShapeLength omitnull.Val[float64] `db:"shape__length" `
|
||||
}
|
||||
|
||||
func (s FieldseekerTreatmentareaSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 18)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.TreatID.IsUnset() {
|
||||
vals = append(vals, "treat_id")
|
||||
}
|
||||
if !s.SessionID.IsUnset() {
|
||||
vals = append(vals, "session_id")
|
||||
}
|
||||
if !s.Treatdate.IsUnset() {
|
||||
vals = append(vals, "treatdate")
|
||||
}
|
||||
if !s.Comments.IsUnset() {
|
||||
vals = append(vals, "comments")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Notified.IsUnset() {
|
||||
vals = append(vals, "notified")
|
||||
}
|
||||
if !s.Type.IsUnset() {
|
||||
vals = append(vals, "type")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
vals = append(vals, "shape__area")
|
||||
}
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
vals = append(vals, "shape__length")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerTreatmentareaSetter) Overwrite(t *FieldseekerTreatmentarea) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.TreatID.IsUnset() {
|
||||
t.TreatID = s.TreatID.MustGetNull()
|
||||
}
|
||||
if !s.SessionID.IsUnset() {
|
||||
t.SessionID = s.SessionID.MustGetNull()
|
||||
}
|
||||
if !s.Treatdate.IsUnset() {
|
||||
t.Treatdate = s.Treatdate.MustGetNull()
|
||||
}
|
||||
if !s.Comments.IsUnset() {
|
||||
t.Comments = s.Comments.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Notified.IsUnset() {
|
||||
t.Notified = s.Notified.MustGetNull()
|
||||
}
|
||||
if !s.Type.IsUnset() {
|
||||
t.Type = s.Type.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
t.ShapeArea = s.ShapeArea.MustGetNull()
|
||||
}
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
t.ShapeLength = s.ShapeLength.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerTreatmentareaSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerTreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 18)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.TreatID.IsUnset() {
|
||||
vals[1] = psql.Arg(s.TreatID.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.SessionID.IsUnset() {
|
||||
vals[2] = psql.Arg(s.SessionID.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Treatdate.IsUnset() {
|
||||
vals[3] = psql.Arg(s.Treatdate.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Comments.IsUnset() {
|
||||
vals[4] = psql.Arg(s.Comments.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[5] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[6] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[7] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[8] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[9] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Notified.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Notified.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Type.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Type.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[12] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[13] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[14] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[14] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[15] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[15] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
vals[16] = psql.Arg(s.ShapeArea.MustGetNull())
|
||||
} else {
|
||||
vals[16] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
vals[17] = psql.Arg(s.ShapeLength.MustGetNull())
|
||||
} else {
|
||||
vals[17] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerTreatmentareaSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerTreatmentareaSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 18)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.TreatID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "treat_id")...),
|
||||
psql.Arg(s.TreatID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.SessionID.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "session_id")...),
|
||||
psql.Arg(s.SessionID),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Treatdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "treatdate")...),
|
||||
psql.Arg(s.Treatdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Comments.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "comments")...),
|
||||
psql.Arg(s.Comments),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Notified.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "notified")...),
|
||||
psql.Arg(s.Notified),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Type.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "type")...),
|
||||
psql.Arg(s.Type),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "shape__area")...),
|
||||
psql.Arg(s.ShapeArea),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "shape__length")...),
|
||||
psql.Arg(s.ShapeLength),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerTreatmentarea retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerTreatmentarea(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerTreatmentarea, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerTreatmentareas.Query(
|
||||
sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerTreatmentareas.Query(
|
||||
sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerTreatmentareas.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerTreatmentareaExists checks the presence of a single record by primary key
|
||||
func FieldseekerTreatmentareaExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerTreatmentareas.Query(
|
||||
sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerTreatmentarea is retrieved from the database
|
||||
func (o *FieldseekerTreatmentarea) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerTreatmentarea
|
||||
func (o *FieldseekerTreatmentarea) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerTreatmentarea) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.treatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerTreatmentarea
|
||||
func (o *FieldseekerTreatmentarea) Update(ctx context.Context, exec bob.Executor, s *FieldseekerTreatmentareaSetter) error {
|
||||
v, err := FieldseekerTreatmentareas.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerTreatmentarea record with an executor
|
||||
func (o *FieldseekerTreatmentarea) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerTreatmentareas.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerTreatmentarea using the executor
|
||||
func (o *FieldseekerTreatmentarea) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerTreatmentareas.Query(
|
||||
sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerTreatmentareaSlice is retrieved from the database
|
||||
func (o FieldseekerTreatmentareaSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerTreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerTreatmentareaSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.treatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerTreatmentareaSlice) copyMatchingRows(from ...*FieldseekerTreatmentarea) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerTreatmentareaSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerTreatmentareas.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerTreatmentarea:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerTreatmentarea:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerTreatmentareaSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerTreatmentarea or a slice of FieldseekerTreatmentarea
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerTreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerTreatmentareaSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerTreatmentareas.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerTreatmentarea:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerTreatmentarea:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerTreatmentareaSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerTreatmentarea or a slice of FieldseekerTreatmentarea
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerTreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerTreatmentareaSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerTreatmentareaSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerTreatmentareas.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerTreatmentareaSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerTreatmentareas.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerTreatmentareaSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerTreatmentareas.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerTreatmentareaWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
TreatID psql.WhereNullMod[Q, uuid.UUID]
|
||||
SessionID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Treatdate psql.WhereNullMod[Q, time.Time]
|
||||
Comments psql.WhereNullMod[Q, string]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Notified psql.WhereNullMod[Q, int16]
|
||||
Type psql.WhereNullMod[Q, string]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
ShapeArea psql.WhereNullMod[Q, float64]
|
||||
ShapeLength psql.WhereNullMod[Q, float64]
|
||||
}
|
||||
|
||||
func (fieldseekerTreatmentareaWhere[Q]) AliasedAs(alias string) fieldseekerTreatmentareaWhere[Q] {
|
||||
return buildFieldseekerTreatmentareaWhere[Q](buildFieldseekerTreatmentareaColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerTreatmentareaWhere[Q psql.Filterable](cols fieldseekerTreatmentareaColumns) fieldseekerTreatmentareaWhere[Q] {
|
||||
return fieldseekerTreatmentareaWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
TreatID: psql.WhereNull[Q, uuid.UUID](cols.TreatID),
|
||||
SessionID: psql.WhereNull[Q, uuid.UUID](cols.SessionID),
|
||||
Treatdate: psql.WhereNull[Q, time.Time](cols.Treatdate),
|
||||
Comments: psql.WhereNull[Q, string](cols.Comments),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Notified: psql.WhereNull[Q, int16](cols.Notified),
|
||||
Type: psql.WhereNull[Q, string](cols.Type),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea),
|
||||
ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength),
|
||||
}
|
||||
}
|
||||
79
db/models/fieldseeker.ulvsprayroute.bob.go
Normal file
79
db/models/fieldseeker.ulvsprayroute.bob.go
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerUlvsprayroute is an object representing the database table.
|
||||
type FieldseekerUlvsprayroute struct{}
|
||||
|
||||
// FieldseekerUlvsprayrouteSlice is an alias for a slice of pointers to FieldseekerUlvsprayroute.
|
||||
// This should almost always be used instead of []*FieldseekerUlvsprayroute.
|
||||
type FieldseekerUlvsprayrouteSlice []*FieldseekerUlvsprayroute
|
||||
|
||||
// FieldseekerUlvsprayroutes contains methods to work with the ulvsprayroute view
|
||||
var FieldseekerUlvsprayroutes = psql.NewViewx[*FieldseekerUlvsprayroute, FieldseekerUlvsprayrouteSlice]("fieldseeker", "ulvsprayroute", buildFieldseekerUlvsprayrouteColumns("fieldseeker.ulvsprayroute"))
|
||||
|
||||
// FieldseekerUlvsprayroutesQuery is a query on the ulvsprayroute view
|
||||
type FieldseekerUlvsprayroutesQuery = *psql.ViewQuery[*FieldseekerUlvsprayroute, FieldseekerUlvsprayrouteSlice]
|
||||
|
||||
func buildFieldseekerUlvsprayrouteColumns(alias string) fieldseekerUlvsprayrouteColumns {
|
||||
return fieldseekerUlvsprayrouteColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.ulvsprayroute"),
|
||||
tableAlias: alias,
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerUlvsprayrouteColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
}
|
||||
|
||||
func (c fieldseekerUlvsprayrouteColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerUlvsprayrouteColumns) AliasedAs(alias string) fieldseekerUlvsprayrouteColumns {
|
||||
return buildFieldseekerUlvsprayrouteColumns(alias)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerUlvsprayroute is retrieved from the database
|
||||
func (o *FieldseekerUlvsprayroute) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerUlvsprayroutes.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerUlvsprayrouteSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerUlvsprayrouteSlice is retrieved from the database
|
||||
func (o FieldseekerUlvsprayrouteSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerUlvsprayroutes.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
type fieldseekerUlvsprayrouteWhere[Q psql.Filterable] struct{}
|
||||
|
||||
func (fieldseekerUlvsprayrouteWhere[Q]) AliasedAs(alias string) fieldseekerUlvsprayrouteWhere[Q] {
|
||||
return buildFieldseekerUlvsprayrouteWhere[Q](buildFieldseekerUlvsprayrouteColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerUlvsprayrouteWhere[Q psql.Filterable](cols fieldseekerUlvsprayrouteColumns) fieldseekerUlvsprayrouteWhere[Q] {
|
||||
return fieldseekerUlvsprayrouteWhere[Q]{}
|
||||
}
|
||||
678
db/models/fieldseeker.zones.bob.go
Normal file
678
db/models/fieldseeker.zones.bob.go
Normal file
|
|
@ -0,0 +1,678 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerZone is an object representing the database table.
|
||||
type FieldseekerZone struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
// Name
|
||||
Name null.Val[string] `db:"name" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Active null.Val[int32] `db:"active" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
ShapeArea null.Val[float64] `db:"shape__area" `
|
||||
ShapeLength null.Val[float64] `db:"shape__length" `
|
||||
}
|
||||
|
||||
// FieldseekerZoneSlice is an alias for a slice of pointers to FieldseekerZone.
|
||||
// This should almost always be used instead of []*FieldseekerZone.
|
||||
type FieldseekerZoneSlice []*FieldseekerZone
|
||||
|
||||
// FieldseekerZones contains methods to work with the zones table
|
||||
var FieldseekerZones = psql.NewTablex[*FieldseekerZone, FieldseekerZoneSlice, *FieldseekerZoneSetter]("fieldseeker", "zones", buildFieldseekerZoneColumns("fieldseeker.zones"))
|
||||
|
||||
// FieldseekerZonesQuery is a query on the zones table
|
||||
type FieldseekerZonesQuery = *psql.ViewQuery[*FieldseekerZone, FieldseekerZoneSlice]
|
||||
|
||||
func buildFieldseekerZoneColumns(alias string) fieldseekerZoneColumns {
|
||||
return fieldseekerZoneColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "name", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "active", "creationdate", "creator", "editdate", "editor", "shape__area", "shape__length",
|
||||
).WithParent("fieldseeker.zones"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Name: psql.Quote(alias, "name"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Active: psql.Quote(alias, "active"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
ShapeArea: psql.Quote(alias, "shape__area"),
|
||||
ShapeLength: psql.Quote(alias, "shape__length"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerZoneColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Name psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Active psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
ShapeArea psql.Expression
|
||||
ShapeLength psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerZoneColumns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerZoneColumns) AliasedAs(alias string) fieldseekerZoneColumns {
|
||||
return buildFieldseekerZoneColumns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerZoneSetter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerZoneSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Active omitnull.Val[int32] `db:"active" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
ShapeArea omitnull.Val[float64] `db:"shape__area" `
|
||||
ShapeLength omitnull.Val[float64] `db:"shape__length" `
|
||||
}
|
||||
|
||||
func (s FieldseekerZoneSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Name.IsUnset() {
|
||||
vals = append(vals, "name")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Active.IsUnset() {
|
||||
vals = append(vals, "active")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
vals = append(vals, "shape__area")
|
||||
}
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
vals = append(vals, "shape__length")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerZoneSetter) Overwrite(t *FieldseekerZone) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Name.IsUnset() {
|
||||
t.Name = s.Name.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Active.IsUnset() {
|
||||
t.Active = s.Active.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
t.ShapeArea = s.ShapeArea.MustGetNull()
|
||||
}
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
t.ShapeLength = s.ShapeLength.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerZoneSetter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerZones.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 14)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Name.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Name.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[3] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[4] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[5] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[6] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Active.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Active.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[11] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
vals[12] = psql.Arg(s.ShapeArea.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
vals[13] = psql.Arg(s.ShapeLength.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerZoneSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerZoneSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 14)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Name.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "name")...),
|
||||
psql.Arg(s.Name),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Active.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "active")...),
|
||||
psql.Arg(s.Active),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "shape__area")...),
|
||||
psql.Arg(s.ShapeArea),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "shape__length")...),
|
||||
psql.Arg(s.ShapeLength),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerZone retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerZone(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerZone, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerZones.Query(
|
||||
sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerZones.Query(
|
||||
sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerZones.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerZoneExists checks the presence of a single record by primary key
|
||||
func FieldseekerZoneExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerZones.Query(
|
||||
sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerZone is retrieved from the database
|
||||
func (o *FieldseekerZone) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerZones.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerZones.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerZones.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerZones.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerZone
|
||||
func (o *FieldseekerZone) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerZone) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.zones", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerZone
|
||||
func (o *FieldseekerZone) Update(ctx context.Context, exec bob.Executor, s *FieldseekerZoneSetter) error {
|
||||
v, err := FieldseekerZones.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerZone record with an executor
|
||||
func (o *FieldseekerZone) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerZones.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerZone using the executor
|
||||
func (o *FieldseekerZone) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerZones.Query(
|
||||
sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerZoneSlice is retrieved from the database
|
||||
func (o FieldseekerZoneSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerZones.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerZones.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerZones.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerZones.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerZoneSlice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.zones", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerZoneSlice) copyMatchingRows(from ...*FieldseekerZone) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerZoneSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerZones.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerZone:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerZone:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerZoneSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerZone or a slice of FieldseekerZone
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerZones.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerZoneSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerZones.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerZone:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerZone:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerZoneSlice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerZone or a slice of FieldseekerZone
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerZones.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerZoneSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerZoneSetter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerZones.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerZoneSlice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerZones.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerZoneSlice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerZones.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerZoneWhere[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Name psql.WhereNullMod[Q, string]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Active psql.WhereNullMod[Q, int32]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
ShapeArea psql.WhereNullMod[Q, float64]
|
||||
ShapeLength psql.WhereNullMod[Q, float64]
|
||||
}
|
||||
|
||||
func (fieldseekerZoneWhere[Q]) AliasedAs(alias string) fieldseekerZoneWhere[Q] {
|
||||
return buildFieldseekerZoneWhere[Q](buildFieldseekerZoneColumns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerZoneWhere[Q psql.Filterable](cols fieldseekerZoneColumns) fieldseekerZoneWhere[Q] {
|
||||
return fieldseekerZoneWhere[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Name: psql.WhereNull[Q, string](cols.Name),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Active: psql.WhereNull[Q, int32](cols.Active),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea),
|
||||
ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength),
|
||||
}
|
||||
}
|
||||
653
db/models/fieldseeker.zones2.bob.go
Normal file
653
db/models/fieldseeker.zones2.bob.go
Normal file
|
|
@ -0,0 +1,653 @@
|
|||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/aarondl/opt/null"
|
||||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/gofrs/uuid/v5"
|
||||
"github.com/stephenafamo/bob"
|
||||
"github.com/stephenafamo/bob/dialect/psql"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dialect"
|
||||
"github.com/stephenafamo/bob/dialect/psql/dm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/sm"
|
||||
"github.com/stephenafamo/bob/dialect/psql/um"
|
||||
"github.com/stephenafamo/bob/expr"
|
||||
)
|
||||
|
||||
// FieldseekerZones2 is an object representing the database table.
|
||||
type FieldseekerZones2 struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
// Name
|
||||
Name null.Val[string] `db:"name" `
|
||||
Globalid null.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
CreatedDate null.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser null.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate null.Val[time.Time] `db:"creationdate" `
|
||||
Creator null.Val[string] `db:"creator" `
|
||||
Editdate null.Val[time.Time] `db:"editdate" `
|
||||
Editor null.Val[string] `db:"editor" `
|
||||
ShapeArea null.Val[float64] `db:"shape__area" `
|
||||
ShapeLength null.Val[float64] `db:"shape__length" `
|
||||
}
|
||||
|
||||
// FieldseekerZones2Slice is an alias for a slice of pointers to FieldseekerZones2.
|
||||
// This should almost always be used instead of []*FieldseekerZones2.
|
||||
type FieldseekerZones2Slice []*FieldseekerZones2
|
||||
|
||||
// FieldseekerZones2s contains methods to work with the zones2 table
|
||||
var FieldseekerZones2s = psql.NewTablex[*FieldseekerZones2, FieldseekerZones2Slice, *FieldseekerZones2Setter]("fieldseeker", "zones2", buildFieldseekerZones2Columns("fieldseeker.zones2"))
|
||||
|
||||
// FieldseekerZones2sQuery is a query on the zones2 table
|
||||
type FieldseekerZones2sQuery = *psql.ViewQuery[*FieldseekerZones2, FieldseekerZones2Slice]
|
||||
|
||||
func buildFieldseekerZones2Columns(alias string) fieldseekerZones2Columns {
|
||||
return fieldseekerZones2Columns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"objectid", "name", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor", "shape__area", "shape__length",
|
||||
).WithParent("fieldseeker.zones2"),
|
||||
tableAlias: alias,
|
||||
Objectid: psql.Quote(alias, "objectid"),
|
||||
Name: psql.Quote(alias, "name"),
|
||||
Globalid: psql.Quote(alias, "globalid"),
|
||||
CreatedUser: psql.Quote(alias, "created_user"),
|
||||
CreatedDate: psql.Quote(alias, "created_date"),
|
||||
LastEditedUser: psql.Quote(alias, "last_edited_user"),
|
||||
LastEditedDate: psql.Quote(alias, "last_edited_date"),
|
||||
Creationdate: psql.Quote(alias, "creationdate"),
|
||||
Creator: psql.Quote(alias, "creator"),
|
||||
Editdate: psql.Quote(alias, "editdate"),
|
||||
Editor: psql.Quote(alias, "editor"),
|
||||
ShapeArea: psql.Quote(alias, "shape__area"),
|
||||
ShapeLength: psql.Quote(alias, "shape__length"),
|
||||
}
|
||||
}
|
||||
|
||||
type fieldseekerZones2Columns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
Objectid psql.Expression
|
||||
Name psql.Expression
|
||||
Globalid psql.Expression
|
||||
CreatedUser psql.Expression
|
||||
CreatedDate psql.Expression
|
||||
LastEditedUser psql.Expression
|
||||
LastEditedDate psql.Expression
|
||||
Creationdate psql.Expression
|
||||
Creator psql.Expression
|
||||
Editdate psql.Expression
|
||||
Editor psql.Expression
|
||||
ShapeArea psql.Expression
|
||||
ShapeLength psql.Expression
|
||||
}
|
||||
|
||||
func (c fieldseekerZones2Columns) Alias() string {
|
||||
return c.tableAlias
|
||||
}
|
||||
|
||||
func (fieldseekerZones2Columns) AliasedAs(alias string) fieldseekerZones2Columns {
|
||||
return buildFieldseekerZones2Columns(alias)
|
||||
}
|
||||
|
||||
// FieldseekerZones2Setter is used for insert/upsert/update operations
|
||||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerZones2Setter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Globalid omitnull.Val[uuid.UUID] `db:"globalid" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
Editdate omitnull.Val[time.Time] `db:"editdate" `
|
||||
Editor omitnull.Val[string] `db:"editor" `
|
||||
ShapeArea omitnull.Val[float64] `db:"shape__area" `
|
||||
ShapeLength omitnull.Val[float64] `db:"shape__length" `
|
||||
}
|
||||
|
||||
func (s FieldseekerZones2Setter) SetColumns() []string {
|
||||
vals := make([]string, 0, 13)
|
||||
if s.Objectid.IsValue() {
|
||||
vals = append(vals, "objectid")
|
||||
}
|
||||
if !s.Name.IsUnset() {
|
||||
vals = append(vals, "name")
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals = append(vals, "globalid")
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals = append(vals, "created_user")
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals = append(vals, "created_date")
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals = append(vals, "last_edited_user")
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals = append(vals, "last_edited_date")
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals = append(vals, "creationdate")
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
vals = append(vals, "creator")
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals = append(vals, "editdate")
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
vals = append(vals, "editor")
|
||||
}
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
vals = append(vals, "shape__area")
|
||||
}
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
vals = append(vals, "shape__length")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
func (s FieldseekerZones2Setter) Overwrite(t *FieldseekerZones2) {
|
||||
if s.Objectid.IsValue() {
|
||||
t.Objectid = s.Objectid.MustGet()
|
||||
}
|
||||
if !s.Name.IsUnset() {
|
||||
t.Name = s.Name.MustGetNull()
|
||||
}
|
||||
if !s.Globalid.IsUnset() {
|
||||
t.Globalid = s.Globalid.MustGetNull()
|
||||
}
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
t.CreatedUser = s.CreatedUser.MustGetNull()
|
||||
}
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
t.CreatedDate = s.CreatedDate.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
t.LastEditedUser = s.LastEditedUser.MustGetNull()
|
||||
}
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
t.LastEditedDate = s.LastEditedDate.MustGetNull()
|
||||
}
|
||||
if !s.Creationdate.IsUnset() {
|
||||
t.Creationdate = s.Creationdate.MustGetNull()
|
||||
}
|
||||
if !s.Creator.IsUnset() {
|
||||
t.Creator = s.Creator.MustGetNull()
|
||||
}
|
||||
if !s.Editdate.IsUnset() {
|
||||
t.Editdate = s.Editdate.MustGetNull()
|
||||
}
|
||||
if !s.Editor.IsUnset() {
|
||||
t.Editor = s.Editor.MustGetNull()
|
||||
}
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
t.ShapeArea = s.ShapeArea.MustGetNull()
|
||||
}
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
t.ShapeLength = s.ShapeLength.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FieldseekerZones2Setter) Apply(q *dialect.InsertQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerZones2s.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 13)
|
||||
if s.Objectid.IsValue() {
|
||||
vals[0] = psql.Arg(s.Objectid.MustGet())
|
||||
} else {
|
||||
vals[0] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Name.IsUnset() {
|
||||
vals[1] = psql.Arg(s.Name.MustGetNull())
|
||||
} else {
|
||||
vals[1] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
vals[2] = psql.Arg(s.Globalid.MustGetNull())
|
||||
} else {
|
||||
vals[2] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
vals[3] = psql.Arg(s.CreatedUser.MustGetNull())
|
||||
} else {
|
||||
vals[3] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
vals[4] = psql.Arg(s.CreatedDate.MustGetNull())
|
||||
} else {
|
||||
vals[4] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
vals[5] = psql.Arg(s.LastEditedUser.MustGetNull())
|
||||
} else {
|
||||
vals[5] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
vals[6] = psql.Arg(s.LastEditedDate.MustGetNull())
|
||||
} else {
|
||||
vals[6] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
vals[7] = psql.Arg(s.Creationdate.MustGetNull())
|
||||
} else {
|
||||
vals[7] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
vals[8] = psql.Arg(s.Creator.MustGetNull())
|
||||
} else {
|
||||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
vals[9] = psql.Arg(s.Editdate.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
vals[10] = psql.Arg(s.Editor.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
vals[11] = psql.Arg(s.ShapeArea.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
vals[12] = psql.Arg(s.ShapeLength.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
func (s FieldseekerZones2Setter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return um.Set(s.Expressions()...)
|
||||
}
|
||||
|
||||
func (s FieldseekerZones2Setter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 13)
|
||||
|
||||
if s.Objectid.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "objectid")...),
|
||||
psql.Arg(s.Objectid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Name.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "name")...),
|
||||
psql.Arg(s.Name),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Globalid.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "globalid")...),
|
||||
psql.Arg(s.Globalid),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_user")...),
|
||||
psql.Arg(s.CreatedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.CreatedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "created_date")...),
|
||||
psql.Arg(s.CreatedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedUser.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_user")...),
|
||||
psql.Arg(s.LastEditedUser),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.LastEditedDate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "last_edited_date")...),
|
||||
psql.Arg(s.LastEditedDate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creationdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creationdate")...),
|
||||
psql.Arg(s.Creationdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Creator.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "creator")...),
|
||||
psql.Arg(s.Creator),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editdate.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editdate")...),
|
||||
psql.Arg(s.Editdate),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.Editor.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "editor")...),
|
||||
psql.Arg(s.Editor),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ShapeArea.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "shape__area")...),
|
||||
psql.Arg(s.ShapeArea),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ShapeLength.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "shape__length")...),
|
||||
psql.Arg(s.ShapeLength),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
// FindFieldseekerZones2 retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerZones2(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerZones2, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerZones2s.Query(
|
||||
sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerZones2s.Query(
|
||||
sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Columns(FieldseekerZones2s.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerZones2Exists checks the presence of a single record by primary key
|
||||
func FieldseekerZones2Exists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) {
|
||||
return FieldseekerZones2s.Query(
|
||||
sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerZones2 is retrieved from the database
|
||||
func (o *FieldseekerZones2) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerZones2s.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o})
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerZones2s.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o})
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerZones2s.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o})
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerZones2s.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o})
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// primaryKeyVals returns the primary key values of the FieldseekerZones2
|
||||
func (o *FieldseekerZones2) primaryKeyVals() bob.Expression {
|
||||
return psql.Arg(o.Objectid)
|
||||
}
|
||||
|
||||
func (o *FieldseekerZones2) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker.zones2", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
||||
// Update uses an executor to update the FieldseekerZones2
|
||||
func (o *FieldseekerZones2) Update(ctx context.Context, exec bob.Executor, s *FieldseekerZones2Setter) error {
|
||||
v, err := FieldseekerZones2s.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *v
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single FieldseekerZones2 record with an executor
|
||||
func (o *FieldseekerZones2) Delete(ctx context.Context, exec bob.Executor) error {
|
||||
_, err := FieldseekerZones2s.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
// Reload refreshes the FieldseekerZones2 using the executor
|
||||
func (o *FieldseekerZones2) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerZones2s.Query(
|
||||
sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*o = *o2
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// AfterQueryHook is called after FieldseekerZones2Slice is retrieved from the database
|
||||
func (o FieldseekerZones2Slice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error {
|
||||
var err error
|
||||
|
||||
switch queryType {
|
||||
case bob.QueryTypeSelect:
|
||||
ctx, err = FieldseekerZones2s.AfterSelectHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeInsert:
|
||||
ctx, err = FieldseekerZones2s.AfterInsertHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeUpdate:
|
||||
ctx, err = FieldseekerZones2s.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
case bob.QueryTypeDelete:
|
||||
ctx, err = FieldseekerZones2s.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerZones2Slice) pkIN() dialect.Expression {
|
||||
if len(o) == 0 {
|
||||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker.zones2", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
}
|
||||
return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
||||
// copyMatchingRows finds models in the given slice that have the same primary key
|
||||
// then it first copies the existing relationships from the old model to the new model
|
||||
// and then replaces the old model in the slice with the new model
|
||||
func (o FieldseekerZones2Slice) copyMatchingRows(from ...*FieldseekerZones2) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
continue
|
||||
}
|
||||
|
||||
o[i] = new
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// UpdateMod modifies an update query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerZones2Slice) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
||||
return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerZones2s.BeforeUpdateHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerZones2:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerZones2:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerZones2Slice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerZones2 or a slice of FieldseekerZones2
|
||||
// then run the AfterUpdateHooks on the slice
|
||||
_, err = FieldseekerZones2s.AfterUpdateHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)"
|
||||
func (o FieldseekerZones2Slice) DeleteMod() bob.Mod[*dialect.DeleteQuery] {
|
||||
return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) {
|
||||
q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) {
|
||||
return FieldseekerZones2s.BeforeDeleteHooks.RunHooks(ctx, exec, o)
|
||||
})
|
||||
|
||||
q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error {
|
||||
var err error
|
||||
switch retrieved := retrieved.(type) {
|
||||
case *FieldseekerZones2:
|
||||
o.copyMatchingRows(retrieved)
|
||||
case []*FieldseekerZones2:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
case FieldseekerZones2Slice:
|
||||
o.copyMatchingRows(retrieved...)
|
||||
default:
|
||||
// If the retrieved value is not a FieldseekerZones2 or a slice of FieldseekerZones2
|
||||
// then run the AfterDeleteHooks on the slice
|
||||
_, err = FieldseekerZones2s.AfterDeleteHooks.RunHooks(ctx, exec, o)
|
||||
}
|
||||
|
||||
return err
|
||||
}))
|
||||
|
||||
q.AppendWhere(o.pkIN())
|
||||
})
|
||||
}
|
||||
|
||||
func (o FieldseekerZones2Slice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerZones2Setter) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerZones2s.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerZones2Slice) DeleteAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := FieldseekerZones2s.Delete(o.DeleteMod()).Exec(ctx, exec)
|
||||
return err
|
||||
}
|
||||
|
||||
func (o FieldseekerZones2Slice) ReloadAll(ctx context.Context, exec bob.Executor) error {
|
||||
if len(o) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
o2, err := FieldseekerZones2s.Query(sm.Where(o.pkIN())).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
o.copyMatchingRows(o2...)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fieldseekerZones2Where[Q psql.Filterable] struct {
|
||||
Objectid psql.WhereMod[Q, int64]
|
||||
Name psql.WhereNullMod[Q, string]
|
||||
Globalid psql.WhereNullMod[Q, uuid.UUID]
|
||||
CreatedUser psql.WhereNullMod[Q, string]
|
||||
CreatedDate psql.WhereNullMod[Q, time.Time]
|
||||
LastEditedUser psql.WhereNullMod[Q, string]
|
||||
LastEditedDate psql.WhereNullMod[Q, time.Time]
|
||||
Creationdate psql.WhereNullMod[Q, time.Time]
|
||||
Creator psql.WhereNullMod[Q, string]
|
||||
Editdate psql.WhereNullMod[Q, time.Time]
|
||||
Editor psql.WhereNullMod[Q, string]
|
||||
ShapeArea psql.WhereNullMod[Q, float64]
|
||||
ShapeLength psql.WhereNullMod[Q, float64]
|
||||
}
|
||||
|
||||
func (fieldseekerZones2Where[Q]) AliasedAs(alias string) fieldseekerZones2Where[Q] {
|
||||
return buildFieldseekerZones2Where[Q](buildFieldseekerZones2Columns(alias))
|
||||
}
|
||||
|
||||
func buildFieldseekerZones2Where[Q psql.Filterable](cols fieldseekerZones2Columns) fieldseekerZones2Where[Q] {
|
||||
return fieldseekerZones2Where[Q]{
|
||||
Objectid: psql.Where[Q, int64](cols.Objectid),
|
||||
Name: psql.WhereNull[Q, string](cols.Name),
|
||||
Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid),
|
||||
CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser),
|
||||
CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate),
|
||||
LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser),
|
||||
LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate),
|
||||
Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate),
|
||||
Creator: psql.WhereNull[Q, string](cols.Creator),
|
||||
Editdate: psql.WhereNull[Q, time.Time](cols.Editdate),
|
||||
Editor: psql.WhereNull[Q, string](cols.Editor),
|
||||
ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea),
|
||||
ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength),
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -144,7 +144,7 @@ func (s *FieldseekerSyncSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FieldseekerSyncs.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 6)
|
||||
if s.ID.IsValue() {
|
||||
vals[0] = psql.Arg(s.ID.MustGet())
|
||||
|
|
@ -284,7 +284,7 @@ func (o *FieldseekerSync) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FieldseekerSync) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fieldseeker_sync", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fieldseeker_sync", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -345,7 +345,7 @@ func (o FieldseekerSyncSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fieldseeker_sync", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fieldseeker_sync", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -266,7 +266,7 @@ func (s *FSContainerrelateSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSContainerrelates.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 18)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -562,7 +562,7 @@ func (o *FSContainerrelate) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSContainerrelate) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_containerrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_containerrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -623,7 +623,7 @@ func (o FSContainerrelateSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_containerrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_containerrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -236,7 +236,7 @@ func (s *FSFieldscoutinglogSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSFieldscoutinglogs.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 15)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -493,7 +493,7 @@ func (o *FSFieldscoutinglog) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSFieldscoutinglog) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_fieldscoutinglog", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_fieldscoutinglog", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -554,7 +554,7 @@ func (o FSFieldscoutinglogSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_fieldscoutinglog", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_fieldscoutinglog", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -246,7 +246,7 @@ func (s *FSHabitatrelateSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSHabitatrelates.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 16)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -516,7 +516,7 @@ func (o *FSHabitatrelate) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSHabitatrelate) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_habitatrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_habitatrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -577,7 +577,7 @@ func (o FSHabitatrelateSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_habitatrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_habitatrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -266,7 +266,7 @@ func (s *FSInspectionsampleSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSInspectionsamples.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 18)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -562,7 +562,7 @@ func (o *FSInspectionsample) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSInspectionsample) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_inspectionsample", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_inspectionsample", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -623,7 +623,7 @@ func (o FSInspectionsampleSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_inspectionsample", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_inspectionsample", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -376,7 +376,7 @@ func (s *FSInspectionsampledetailSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSInspectionsampledetails.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 29)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -815,7 +815,7 @@ func (o *FSInspectionsampledetail) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSInspectionsampledetail) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_inspectionsampledetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_inspectionsampledetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -876,7 +876,7 @@ func (o FSInspectionsampledetailSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_inspectionsampledetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_inspectionsampledetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -606,7 +606,7 @@ func (s *FSLinelocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSLinelocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 52)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1344,7 +1344,7 @@ func (o *FSLinelocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSLinelocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_linelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_linelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1405,7 +1405,7 @@ func (o FSLinelocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_linelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_linelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -246,7 +246,7 @@ func (s *FSLocationtrackingSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSLocationtrackings.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 16)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -516,7 +516,7 @@ func (o *FSLocationtracking) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSLocationtracking) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_locationtracking", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_locationtracking", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -577,7 +577,7 @@ func (o FSLocationtrackingSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_locationtracking", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_locationtracking", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -706,7 +706,7 @@ func (s *FSMosquitoinspectionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSMosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 62)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1574,7 +1574,7 @@ func (o *FSMosquitoinspection) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSMosquitoinspection) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_mosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_mosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1635,7 +1635,7 @@ func (o FSMosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_mosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_mosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -576,7 +576,7 @@ func (s *FSPointlocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSPointlocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 49)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1275,7 +1275,7 @@ func (o *FSPointlocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSPointlocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_pointlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_pointlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1336,7 +1336,7 @@ func (o FSPointlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_pointlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_pointlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -546,7 +546,7 @@ func (s *FSPolygonlocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSPolygonlocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 46)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1206,7 +1206,7 @@ func (o *FSPolygonlocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSPolygonlocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_polygonlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_polygonlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1267,7 +1267,7 @@ func (o FSPolygonlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_polygonlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_polygonlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -406,7 +406,7 @@ func (s *FSPoolSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSPools.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 32)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -884,7 +884,7 @@ func (o *FSPool) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSPool) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_pool", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_pool", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -945,7 +945,7 @@ func (o FSPoolSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_pool", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_pool", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -266,7 +266,7 @@ func (s *FSPooldetailSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSPooldetails.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 18)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -562,7 +562,7 @@ func (o *FSPooldetail) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSPooldetail) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_pooldetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_pooldetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -623,7 +623,7 @@ func (o FSPooldetailSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_pooldetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_pooldetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -456,7 +456,7 @@ func (s *FSProposedtreatmentareaSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSProposedtreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 37)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -999,7 +999,7 @@ func (o *FSProposedtreatmentarea) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSProposedtreatmentarea) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_proposedtreatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_proposedtreatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1060,7 +1060,7 @@ func (o FSProposedtreatmentareaSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_proposedtreatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_proposedtreatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -746,7 +746,7 @@ func (s *FSQamosquitoinspectionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSQamosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 66)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1666,7 +1666,7 @@ func (o *FSQamosquitoinspection) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSQamosquitoinspection) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_qamosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_qamosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1727,7 +1727,7 @@ func (o FSQamosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_qamosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_qamosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -426,7 +426,7 @@ func (s *FSRodentlocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSRodentlocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 34)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -930,7 +930,7 @@ func (o *FSRodentlocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSRodentlocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_rodentlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_rodentlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -991,7 +991,7 @@ func (o FSRodentlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_rodentlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_rodentlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -586,7 +586,7 @@ func (s *FSSamplecollectionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSSamplecollections.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 50)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1298,7 +1298,7 @@ func (o *FSSamplecollection) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSSamplecollection) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_samplecollection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_samplecollection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1359,7 +1359,7 @@ func (o FSSamplecollectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_samplecollection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_samplecollection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -366,7 +366,7 @@ func (s *FSSamplelocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSSamplelocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 28)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -792,7 +792,7 @@ func (o *FSSamplelocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSSamplelocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_samplelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_samplelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -853,7 +853,7 @@ func (o FSSamplelocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_samplelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_samplelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -986,7 +986,7 @@ func (s *FSServicerequestSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSServicerequests.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 90)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -2218,7 +2218,7 @@ func (o *FSServicerequest) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSServicerequest) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_servicerequest", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_servicerequest", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -2279,7 +2279,7 @@ func (o FSServicerequestSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_servicerequest", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_servicerequest", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -416,7 +416,7 @@ func (s *FSSpeciesabundanceSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSSpeciesabundances.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 33)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -907,7 +907,7 @@ func (o *FSSpeciesabundance) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSSpeciesabundance) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_speciesabundance", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_speciesabundance", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -968,7 +968,7 @@ func (o FSSpeciesabundanceSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_speciesabundance", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_speciesabundance", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -316,7 +316,7 @@ func (s *FSStormdrainSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSStormdrains.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 23)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -677,7 +677,7 @@ func (o *FSStormdrain) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSStormdrain) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_stormdrain", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_stormdrain", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -738,7 +738,7 @@ func (o FSStormdrainSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_stormdrain", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_stormdrain", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -406,7 +406,7 @@ func (s *FSTimecardSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSTimecards.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 32)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -884,7 +884,7 @@ func (o *FSTimecard) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSTimecard) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_timecard", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_timecard", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -945,7 +945,7 @@ func (o FSTimecardSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_timecard", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_timecard", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -546,7 +546,7 @@ func (s *FSTrapdatumSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSTrapdata.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 46)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1206,7 +1206,7 @@ func (o *FSTrapdatum) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSTrapdatum) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_trapdata", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_trapdata", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1267,7 +1267,7 @@ func (o FSTrapdatumSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_trapdata", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_trapdata", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -436,7 +436,7 @@ func (s *FSTraplocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSTraplocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 35)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -953,7 +953,7 @@ func (o *FSTraplocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSTraplocation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_traplocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_traplocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1014,7 +1014,7 @@ func (o FSTraplocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_traplocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_traplocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -676,7 +676,7 @@ func (s *FSTreatmentSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSTreatments.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 59)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1505,7 +1505,7 @@ func (o *FSTreatment) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSTreatment) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_treatment", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_treatment", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1566,7 +1566,7 @@ func (o FSTreatmentSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_treatment", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_treatment", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -306,7 +306,7 @@ func (s *FSTreatmentareaSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSTreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 22)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -654,7 +654,7 @@ func (o *FSTreatmentarea) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSTreatmentarea) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_treatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_treatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -715,7 +715,7 @@ func (o FSTreatmentareaSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_treatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_treatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -266,7 +266,7 @@ func (s *FSZoneSetter) Apply(q *dialect.InsertQuery) {
|
|||
return FSZones.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 18)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -562,7 +562,7 @@ func (o *FSZone) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSZone) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_zones", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_zones", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -623,7 +623,7 @@ func (o FSZoneSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_zones", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_zones", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -256,7 +256,7 @@ func (s *FSZones2Setter) Apply(q *dialect.InsertQuery) {
|
|||
return FSZones2s.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 17)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -539,7 +539,7 @@ func (o *FSZones2) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *FSZones2) pkEQ() dialect.Expression {
|
||||
return psql.Quote("fs_zones2", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_zones2", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -600,7 +600,7 @@ func (o FSZones2Slice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("fs_zones2", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("fs_zones2", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -113,7 +113,7 @@ func (s *GooseDBVersionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return GooseDBVersions.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 4)
|
||||
if s.ID.IsValue() {
|
||||
vals[0] = psql.Arg(s.ID.MustGet())
|
||||
|
|
@ -227,7 +227,7 @@ func (o *GooseDBVersion) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *GooseDBVersion) pkEQ() dialect.Expression {
|
||||
return psql.Quote("goose_db_version", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("goose_db_version", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -287,7 +287,7 @@ func (o GooseDBVersionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("goose_db_version", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("goose_db_version", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -156,7 +156,7 @@ func (s *H3AggregationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return H3Aggregations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 7)
|
||||
if s.ID.IsValue() {
|
||||
vals[0] = psql.Arg(s.ID.MustGet())
|
||||
|
|
@ -309,7 +309,7 @@ func (o *H3Aggregation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *H3Aggregation) pkEQ() dialect.Expression {
|
||||
return psql.Quote("h3_aggregation", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("h3_aggregation", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -370,7 +370,7 @@ func (o H3AggregationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Quote("h3_aggregation", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Quote("h3_aggregation", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -276,7 +276,7 @@ func (s *HistoryContainerrelateSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryContainerrelates.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 19)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -591,7 +591,7 @@ func (o *HistoryContainerrelate) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryContainerrelate) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ func (o HistoryContainerrelateSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -246,7 +246,7 @@ func (s *HistoryFieldscoutinglogSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryFieldscoutinglogs.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 16)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -522,7 +522,7 @@ func (o *HistoryFieldscoutinglog) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryFieldscoutinglog) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -584,7 +584,7 @@ func (o HistoryFieldscoutinglogSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -256,7 +256,7 @@ func (s *HistoryHabitatrelateSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryHabitatrelates.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 17)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -545,7 +545,7 @@ func (o *HistoryHabitatrelate) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryHabitatrelate) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -607,7 +607,7 @@ func (o HistoryHabitatrelateSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -276,7 +276,7 @@ func (s *HistoryInspectionsampleSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryInspectionsamples.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 19)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -591,7 +591,7 @@ func (o *HistoryInspectionsample) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryInspectionsample) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ func (o HistoryInspectionsampleSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -386,7 +386,7 @@ func (s *HistoryInspectionsampledetailSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryInspectionsampledetails.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 30)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -844,7 +844,7 @@ func (o *HistoryInspectionsampledetail) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryInspectionsampledetail) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -906,7 +906,7 @@ func (o HistoryInspectionsampledetailSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -616,7 +616,7 @@ func (s *HistoryLinelocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryLinelocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 53)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1373,7 +1373,7 @@ func (o *HistoryLinelocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryLinelocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1435,7 +1435,7 @@ func (o HistoryLinelocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -256,7 +256,7 @@ func (s *HistoryLocationtrackingSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryLocationtrackings.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 17)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -545,7 +545,7 @@ func (o *HistoryLocationtracking) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryLocationtracking) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -607,7 +607,7 @@ func (o HistoryLocationtrackingSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -706,7 +706,7 @@ func (s *HistoryMosquitoinspectionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryMosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 62)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1580,7 +1580,7 @@ func (o *HistoryMosquitoinspection) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryMosquitoinspection) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1642,7 +1642,7 @@ func (o HistoryMosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -576,7 +576,7 @@ func (s *HistoryPointlocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryPointlocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 49)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1281,7 +1281,7 @@ func (o *HistoryPointlocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryPointlocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1343,7 +1343,7 @@ func (o HistoryPointlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -556,7 +556,7 @@ func (s *HistoryPolygonlocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryPolygonlocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 47)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1235,7 +1235,7 @@ func (o *HistoryPolygonlocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryPolygonlocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1297,7 +1297,7 @@ func (o HistoryPolygonlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -416,7 +416,7 @@ func (s *HistoryPoolSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryPools.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 33)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -913,7 +913,7 @@ func (o *HistoryPool) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryPool) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -975,7 +975,7 @@ func (o HistoryPoolSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -276,7 +276,7 @@ func (s *HistoryPooldetailSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryPooldetails.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 19)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -591,7 +591,7 @@ func (o *HistoryPooldetail) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryPooldetail) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -653,7 +653,7 @@ func (o HistoryPooldetailSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -466,7 +466,7 @@ func (s *HistoryProposedtreatmentareaSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryProposedtreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 38)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1028,7 +1028,7 @@ func (o *HistoryProposedtreatmentarea) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryProposedtreatmentarea) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1090,7 +1090,7 @@ func (o HistoryProposedtreatmentareaSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -756,7 +756,7 @@ func (s *HistoryQamosquitoinspectionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryQamosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 67)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1695,7 +1695,7 @@ func (o *HistoryQamosquitoinspection) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryQamosquitoinspection) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1757,7 +1757,7 @@ func (o HistoryQamosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -436,7 +436,7 @@ func (s *HistoryRodentlocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryRodentlocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 35)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -959,7 +959,7 @@ func (o *HistoryRodentlocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryRodentlocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1021,7 +1021,7 @@ func (o HistoryRodentlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -596,7 +596,7 @@ func (s *HistorySamplecollectionSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistorySamplecollections.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 51)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1327,7 +1327,7 @@ func (o *HistorySamplecollection) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistorySamplecollection) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1389,7 +1389,7 @@ func (o HistorySamplecollectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -376,7 +376,7 @@ func (s *HistorySamplelocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistorySamplelocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 29)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -821,7 +821,7 @@ func (o *HistorySamplelocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistorySamplelocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -883,7 +883,7 @@ func (o HistorySamplelocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -996,7 +996,7 @@ func (s *HistoryServicerequestSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryServicerequests.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 91)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -2247,7 +2247,7 @@ func (o *HistoryServicerequest) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryServicerequest) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -2309,7 +2309,7 @@ func (o HistoryServicerequestSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -426,7 +426,7 @@ func (s *HistorySpeciesabundanceSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistorySpeciesabundances.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 34)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -936,7 +936,7 @@ func (o *HistorySpeciesabundance) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistorySpeciesabundance) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -998,7 +998,7 @@ func (o HistorySpeciesabundanceSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -326,7 +326,7 @@ func (s *HistoryStormdrainSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryStormdrains.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 24)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -706,7 +706,7 @@ func (o *HistoryStormdrain) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryStormdrain) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -768,7 +768,7 @@ func (o HistoryStormdrainSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -416,7 +416,7 @@ func (s *HistoryTimecardSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryTimecards.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 33)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -913,7 +913,7 @@ func (o *HistoryTimecard) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryTimecard) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -975,7 +975,7 @@ func (o HistoryTimecardSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -556,7 +556,7 @@ func (s *HistoryTrapdatumSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryTrapdata.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 47)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1235,7 +1235,7 @@ func (o *HistoryTrapdatum) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryTrapdatum) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1297,7 +1297,7 @@ func (o HistoryTrapdatumSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -436,7 +436,7 @@ func (s *HistoryTraplocationSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryTraplocations.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 35)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -959,7 +959,7 @@ func (o *HistoryTraplocation) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryTraplocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1021,7 +1021,7 @@ func (o HistoryTraplocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
||||
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
||||
// This file is meant to be re-generated in place and/or deleted at any time.
|
||||
|
||||
package models
|
||||
|
|
@ -676,7 +676,7 @@ func (s *HistoryTreatmentSetter) Apply(q *dialect.InsertQuery) {
|
|||
return HistoryTreatments.BeforeInsertHooks.RunHooks(ctx, exec, s)
|
||||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 59)
|
||||
if s.OrganizationID.IsValue() {
|
||||
vals[0] = psql.Arg(s.OrganizationID.MustGet())
|
||||
|
|
@ -1511,7 +1511,7 @@ func (o *HistoryTreatment) primaryKeyVals() bob.Expression {
|
|||
}
|
||||
|
||||
func (o *HistoryTreatment) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return o.primaryKeyVals().WriteSQL(ctx, w, d, start)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1573,7 +1573,7 @@ func (o HistoryTreatmentSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
pkPairs := make([]bob.Expression, len(o))
|
||||
for i, row := range o {
|
||||
pkPairs[i] = row.primaryKeyVals()
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue