Add initial synchronization of Fieldseeker data by oauth
This involves a lot of copy-pasta of code from the previous version of this logic in another code base. It'll need to be cleaned up, but for now I need something sooner rather than later.
This commit is contained in:
parent
46ea655073
commit
9010726707
235 changed files with 259263 additions and 153 deletions
|
|
@ -8,16 +8,286 @@ import "context"
|
|||
type contextKey string
|
||||
|
||||
var (
|
||||
// Relationship Contexts for fs_containerrelate
|
||||
fsContainerrelateWithParentsCascadingCtx = newContextual[bool]("fsContainerrelateWithParentsCascading")
|
||||
fsContainerrelateRelOrganizationCtx = newContextual[bool]("fs_containerrelate.organization.fs_containerrelate.fs_containerrelate_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_fieldscoutinglog
|
||||
fsFieldscoutinglogWithParentsCascadingCtx = newContextual[bool]("fsFieldscoutinglogWithParentsCascading")
|
||||
fsFieldscoutinglogRelOrganizationCtx = newContextual[bool]("fs_fieldscoutinglog.organization.fs_fieldscoutinglog.fs_fieldscoutinglog_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_habitatrelate
|
||||
fsHabitatrelateWithParentsCascadingCtx = newContextual[bool]("fsHabitatrelateWithParentsCascading")
|
||||
fsHabitatrelateRelOrganizationCtx = newContextual[bool]("fs_habitatrelate.organization.fs_habitatrelate.fs_habitatrelate_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_inspectionsample
|
||||
fsInspectionsampleWithParentsCascadingCtx = newContextual[bool]("fsInspectionsampleWithParentsCascading")
|
||||
fsInspectionsampleRelOrganizationCtx = newContextual[bool]("fs_inspectionsample.organization.fs_inspectionsample.fs_inspectionsample_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_inspectionsampledetail
|
||||
fsInspectionsampledetailWithParentsCascadingCtx = newContextual[bool]("fsInspectionsampledetailWithParentsCascading")
|
||||
fsInspectionsampledetailRelOrganizationCtx = newContextual[bool]("fs_inspectionsampledetail.organization.fs_inspectionsampledetail.fs_inspectionsampledetail_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_linelocation
|
||||
fsLinelocationWithParentsCascadingCtx = newContextual[bool]("fsLinelocationWithParentsCascading")
|
||||
fsLinelocationRelOrganizationCtx = newContextual[bool]("fs_linelocation.organization.fs_linelocation.fs_linelocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_locationtracking
|
||||
fsLocationtrackingWithParentsCascadingCtx = newContextual[bool]("fsLocationtrackingWithParentsCascading")
|
||||
fsLocationtrackingRelOrganizationCtx = newContextual[bool]("fs_locationtracking.organization.fs_locationtracking.fs_locationtracking_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_mosquitoinspection
|
||||
fsMosquitoinspectionWithParentsCascadingCtx = newContextual[bool]("fsMosquitoinspectionWithParentsCascading")
|
||||
fsMosquitoinspectionRelOrganizationCtx = newContextual[bool]("fs_mosquitoinspection.organization.fs_mosquitoinspection.fs_mosquitoinspection_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_pointlocation
|
||||
fsPointlocationWithParentsCascadingCtx = newContextual[bool]("fsPointlocationWithParentsCascading")
|
||||
fsPointlocationRelOrganizationCtx = newContextual[bool]("fs_pointlocation.organization.fs_pointlocation.fs_pointlocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_polygonlocation
|
||||
fsPolygonlocationWithParentsCascadingCtx = newContextual[bool]("fsPolygonlocationWithParentsCascading")
|
||||
fsPolygonlocationRelOrganizationCtx = newContextual[bool]("fs_polygonlocation.organization.fs_polygonlocation.fs_polygonlocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_pool
|
||||
fsPoolWithParentsCascadingCtx = newContextual[bool]("fsPoolWithParentsCascading")
|
||||
fsPoolRelOrganizationCtx = newContextual[bool]("fs_pool.organization.fs_pool.fs_pool_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_pooldetail
|
||||
fsPooldetailWithParentsCascadingCtx = newContextual[bool]("fsPooldetailWithParentsCascading")
|
||||
fsPooldetailRelOrganizationCtx = newContextual[bool]("fs_pooldetail.organization.fs_pooldetail.fs_pooldetail_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_proposedtreatmentarea
|
||||
fsProposedtreatmentareaWithParentsCascadingCtx = newContextual[bool]("fsProposedtreatmentareaWithParentsCascading")
|
||||
fsProposedtreatmentareaRelOrganizationCtx = newContextual[bool]("fs_proposedtreatmentarea.organization.fs_proposedtreatmentarea.fs_proposedtreatmentarea_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_qamosquitoinspection
|
||||
fsQamosquitoinspectionWithParentsCascadingCtx = newContextual[bool]("fsQamosquitoinspectionWithParentsCascading")
|
||||
fsQamosquitoinspectionRelOrganizationCtx = newContextual[bool]("fs_qamosquitoinspection.organization.fs_qamosquitoinspection.fs_qamosquitoinspection_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_rodentlocation
|
||||
fsRodentlocationWithParentsCascadingCtx = newContextual[bool]("fsRodentlocationWithParentsCascading")
|
||||
fsRodentlocationRelOrganizationCtx = newContextual[bool]("fs_rodentlocation.organization.fs_rodentlocation.fs_rodentlocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_samplecollection
|
||||
fsSamplecollectionWithParentsCascadingCtx = newContextual[bool]("fsSamplecollectionWithParentsCascading")
|
||||
fsSamplecollectionRelOrganizationCtx = newContextual[bool]("fs_samplecollection.organization.fs_samplecollection.fs_samplecollection_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_samplelocation
|
||||
fsSamplelocationWithParentsCascadingCtx = newContextual[bool]("fsSamplelocationWithParentsCascading")
|
||||
fsSamplelocationRelOrganizationCtx = newContextual[bool]("fs_samplelocation.organization.fs_samplelocation.fs_samplelocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_servicerequest
|
||||
fsServicerequestWithParentsCascadingCtx = newContextual[bool]("fsServicerequestWithParentsCascading")
|
||||
fsServicerequestRelOrganizationCtx = newContextual[bool]("fs_servicerequest.organization.fs_servicerequest.fs_servicerequest_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_speciesabundance
|
||||
fsSpeciesabundanceWithParentsCascadingCtx = newContextual[bool]("fsSpeciesabundanceWithParentsCascading")
|
||||
fsSpeciesabundanceRelOrganizationCtx = newContextual[bool]("fs_speciesabundance.organization.fs_speciesabundance.fs_speciesabundance_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_stormdrain
|
||||
fsStormdrainWithParentsCascadingCtx = newContextual[bool]("fsStormdrainWithParentsCascading")
|
||||
fsStormdrainRelOrganizationCtx = newContextual[bool]("fs_stormdrain.organization.fs_stormdrain.fs_stormdrain_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_timecard
|
||||
fsTimecardWithParentsCascadingCtx = newContextual[bool]("fsTimecardWithParentsCascading")
|
||||
fsTimecardRelOrganizationCtx = newContextual[bool]("fs_timecard.organization.fs_timecard.fs_timecard_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_trapdata
|
||||
fsTrapdatumWithParentsCascadingCtx = newContextual[bool]("fsTrapdatumWithParentsCascading")
|
||||
fsTrapdatumRelOrganizationCtx = newContextual[bool]("fs_trapdata.organization.fs_trapdata.fs_trapdata_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_traplocation
|
||||
fsTraplocationWithParentsCascadingCtx = newContextual[bool]("fsTraplocationWithParentsCascading")
|
||||
fsTraplocationRelOrganizationCtx = newContextual[bool]("fs_traplocation.organization.fs_traplocation.fs_traplocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_treatment
|
||||
fsTreatmentWithParentsCascadingCtx = newContextual[bool]("fsTreatmentWithParentsCascading")
|
||||
fsTreatmentRelOrganizationCtx = newContextual[bool]("fs_treatment.organization.fs_treatment.fs_treatment_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_treatmentarea
|
||||
fsTreatmentareaWithParentsCascadingCtx = newContextual[bool]("fsTreatmentareaWithParentsCascading")
|
||||
fsTreatmentareaRelOrganizationCtx = newContextual[bool]("fs_treatmentarea.organization.fs_treatmentarea.fs_treatmentarea_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_zones
|
||||
fsZoneWithParentsCascadingCtx = newContextual[bool]("fsZoneWithParentsCascading")
|
||||
fsZoneRelOrganizationCtx = newContextual[bool]("fs_zones.organization.fs_zones.fs_zones_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for fs_zones2
|
||||
fsZones2WithParentsCascadingCtx = newContextual[bool]("fsZones2WithParentsCascading")
|
||||
fsZones2RelOrganizationCtx = newContextual[bool]("fs_zones2.organization.fs_zones2.fs_zones2_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for goose_db_version
|
||||
gooseDBVersionWithParentsCascadingCtx = newContextual[bool]("gooseDBVersionWithParentsCascading")
|
||||
|
||||
// Relationship Contexts for history_containerrelate
|
||||
historyContainerrelateWithParentsCascadingCtx = newContextual[bool]("historyContainerrelateWithParentsCascading")
|
||||
historyContainerrelateRelOrganizationCtx = newContextual[bool]("history_containerrelate.organization.history_containerrelate.history_containerrelate_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_fieldscoutinglog
|
||||
historyFieldscoutinglogWithParentsCascadingCtx = newContextual[bool]("historyFieldscoutinglogWithParentsCascading")
|
||||
historyFieldscoutinglogRelOrganizationCtx = newContextual[bool]("history_fieldscoutinglog.organization.history_fieldscoutinglog.history_fieldscoutinglog_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_habitatrelate
|
||||
historyHabitatrelateWithParentsCascadingCtx = newContextual[bool]("historyHabitatrelateWithParentsCascading")
|
||||
historyHabitatrelateRelOrganizationCtx = newContextual[bool]("history_habitatrelate.organization.history_habitatrelate.history_habitatrelate_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_inspectionsample
|
||||
historyInspectionsampleWithParentsCascadingCtx = newContextual[bool]("historyInspectionsampleWithParentsCascading")
|
||||
historyInspectionsampleRelOrganizationCtx = newContextual[bool]("history_inspectionsample.organization.history_inspectionsample.history_inspectionsample_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_inspectionsampledetail
|
||||
historyInspectionsampledetailWithParentsCascadingCtx = newContextual[bool]("historyInspectionsampledetailWithParentsCascading")
|
||||
historyInspectionsampledetailRelOrganizationCtx = newContextual[bool]("history_inspectionsampledetail.organization.history_inspectionsampledetail.history_inspectionsampledetail_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_linelocation
|
||||
historyLinelocationWithParentsCascadingCtx = newContextual[bool]("historyLinelocationWithParentsCascading")
|
||||
historyLinelocationRelOrganizationCtx = newContextual[bool]("history_linelocation.organization.history_linelocation.history_linelocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_locationtracking
|
||||
historyLocationtrackingWithParentsCascadingCtx = newContextual[bool]("historyLocationtrackingWithParentsCascading")
|
||||
historyLocationtrackingRelOrganizationCtx = newContextual[bool]("history_locationtracking.organization.history_locationtracking.history_locationtracking_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_mosquitoinspection
|
||||
historyMosquitoinspectionWithParentsCascadingCtx = newContextual[bool]("historyMosquitoinspectionWithParentsCascading")
|
||||
historyMosquitoinspectionRelOrganizationCtx = newContextual[bool]("history_mosquitoinspection.organization.history_mosquitoinspection.history_mosquitoinspection_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_pointlocation
|
||||
historyPointlocationWithParentsCascadingCtx = newContextual[bool]("historyPointlocationWithParentsCascading")
|
||||
historyPointlocationRelOrganizationCtx = newContextual[bool]("history_pointlocation.organization.history_pointlocation.history_pointlocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_polygonlocation
|
||||
historyPolygonlocationWithParentsCascadingCtx = newContextual[bool]("historyPolygonlocationWithParentsCascading")
|
||||
historyPolygonlocationRelOrganizationCtx = newContextual[bool]("history_polygonlocation.organization.history_polygonlocation.history_polygonlocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_pool
|
||||
historyPoolWithParentsCascadingCtx = newContextual[bool]("historyPoolWithParentsCascading")
|
||||
historyPoolRelOrganizationCtx = newContextual[bool]("history_pool.organization.history_pool.history_pool_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_pooldetail
|
||||
historyPooldetailWithParentsCascadingCtx = newContextual[bool]("historyPooldetailWithParentsCascading")
|
||||
historyPooldetailRelOrganizationCtx = newContextual[bool]("history_pooldetail.organization.history_pooldetail.history_pooldetail_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_proposedtreatmentarea
|
||||
historyProposedtreatmentareaWithParentsCascadingCtx = newContextual[bool]("historyProposedtreatmentareaWithParentsCascading")
|
||||
historyProposedtreatmentareaRelOrganizationCtx = newContextual[bool]("history_proposedtreatmentarea.organization.history_proposedtreatmentarea.history_proposedtreatmentarea_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_qamosquitoinspection
|
||||
historyQamosquitoinspectionWithParentsCascadingCtx = newContextual[bool]("historyQamosquitoinspectionWithParentsCascading")
|
||||
historyQamosquitoinspectionRelOrganizationCtx = newContextual[bool]("history_qamosquitoinspection.organization.history_qamosquitoinspection.history_qamosquitoinspection_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_rodentlocation
|
||||
historyRodentlocationWithParentsCascadingCtx = newContextual[bool]("historyRodentlocationWithParentsCascading")
|
||||
historyRodentlocationRelOrganizationCtx = newContextual[bool]("history_rodentlocation.organization.history_rodentlocation.history_rodentlocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_samplecollection
|
||||
historySamplecollectionWithParentsCascadingCtx = newContextual[bool]("historySamplecollectionWithParentsCascading")
|
||||
historySamplecollectionRelOrganizationCtx = newContextual[bool]("history_samplecollection.organization.history_samplecollection.history_samplecollection_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_samplelocation
|
||||
historySamplelocationWithParentsCascadingCtx = newContextual[bool]("historySamplelocationWithParentsCascading")
|
||||
historySamplelocationRelOrganizationCtx = newContextual[bool]("history_samplelocation.organization.history_samplelocation.history_samplelocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_servicerequest
|
||||
historyServicerequestWithParentsCascadingCtx = newContextual[bool]("historyServicerequestWithParentsCascading")
|
||||
historyServicerequestRelOrganizationCtx = newContextual[bool]("history_servicerequest.organization.history_servicerequest.history_servicerequest_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_speciesabundance
|
||||
historySpeciesabundanceWithParentsCascadingCtx = newContextual[bool]("historySpeciesabundanceWithParentsCascading")
|
||||
historySpeciesabundanceRelOrganizationCtx = newContextual[bool]("history_speciesabundance.organization.history_speciesabundance.history_speciesabundance_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_stormdrain
|
||||
historyStormdrainWithParentsCascadingCtx = newContextual[bool]("historyStormdrainWithParentsCascading")
|
||||
historyStormdrainRelOrganizationCtx = newContextual[bool]("history_stormdrain.organization.history_stormdrain.history_stormdrain_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_timecard
|
||||
historyTimecardWithParentsCascadingCtx = newContextual[bool]("historyTimecardWithParentsCascading")
|
||||
historyTimecardRelOrganizationCtx = newContextual[bool]("history_timecard.organization.history_timecard.history_timecard_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_trapdata
|
||||
historyTrapdatumWithParentsCascadingCtx = newContextual[bool]("historyTrapdatumWithParentsCascading")
|
||||
historyTrapdatumRelOrganizationCtx = newContextual[bool]("history_trapdata.organization.history_trapdata.history_trapdata_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_traplocation
|
||||
historyTraplocationWithParentsCascadingCtx = newContextual[bool]("historyTraplocationWithParentsCascading")
|
||||
historyTraplocationRelOrganizationCtx = newContextual[bool]("history_traplocation.organization.history_traplocation.history_traplocation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_treatment
|
||||
historyTreatmentWithParentsCascadingCtx = newContextual[bool]("historyTreatmentWithParentsCascading")
|
||||
historyTreatmentRelOrganizationCtx = newContextual[bool]("history_treatment.organization.history_treatment.history_treatment_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_treatmentarea
|
||||
historyTreatmentareaWithParentsCascadingCtx = newContextual[bool]("historyTreatmentareaWithParentsCascading")
|
||||
historyTreatmentareaRelOrganizationCtx = newContextual[bool]("history_treatmentarea.organization.history_treatmentarea.history_treatmentarea_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_zones
|
||||
historyZoneWithParentsCascadingCtx = newContextual[bool]("historyZoneWithParentsCascading")
|
||||
historyZoneRelOrganizationCtx = newContextual[bool]("history_zones.organization.history_zones.history_zones_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for history_zones2
|
||||
historyZones2WithParentsCascadingCtx = newContextual[bool]("historyZones2WithParentsCascading")
|
||||
historyZones2RelOrganizationCtx = newContextual[bool]("history_zones2.organization.history_zones2.history_zones2_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for oauth_token
|
||||
oauthTokenWithParentsCascadingCtx = newContextual[bool]("oauthTokenWithParentsCascading")
|
||||
oauthTokenRelUserUserCtx = newContextual[bool]("oauth_token.user_.oauth_token.oauth_token_user_id_fkey")
|
||||
|
||||
// Relationship Contexts for organization
|
||||
organizationWithParentsCascadingCtx = newContextual[bool]("organizationWithParentsCascading")
|
||||
organizationRelUserCtx = newContextual[bool]("organization.user_.user_.user__organization_id_fkey")
|
||||
organizationWithParentsCascadingCtx = newContextual[bool]("organizationWithParentsCascading")
|
||||
organizationRelFSContainerrelatesCtx = newContextual[bool]("fs_containerrelate.organization.fs_containerrelate.fs_containerrelate_organization_id_fkey")
|
||||
organizationRelFSFieldscoutinglogsCtx = newContextual[bool]("fs_fieldscoutinglog.organization.fs_fieldscoutinglog.fs_fieldscoutinglog_organization_id_fkey")
|
||||
organizationRelFSHabitatrelatesCtx = newContextual[bool]("fs_habitatrelate.organization.fs_habitatrelate.fs_habitatrelate_organization_id_fkey")
|
||||
organizationRelFSInspectionsamplesCtx = newContextual[bool]("fs_inspectionsample.organization.fs_inspectionsample.fs_inspectionsample_organization_id_fkey")
|
||||
organizationRelFSInspectionsampledetailsCtx = newContextual[bool]("fs_inspectionsampledetail.organization.fs_inspectionsampledetail.fs_inspectionsampledetail_organization_id_fkey")
|
||||
organizationRelFSLinelocationsCtx = newContextual[bool]("fs_linelocation.organization.fs_linelocation.fs_linelocation_organization_id_fkey")
|
||||
organizationRelFSLocationtrackingsCtx = newContextual[bool]("fs_locationtracking.organization.fs_locationtracking.fs_locationtracking_organization_id_fkey")
|
||||
organizationRelFSMosquitoinspectionsCtx = newContextual[bool]("fs_mosquitoinspection.organization.fs_mosquitoinspection.fs_mosquitoinspection_organization_id_fkey")
|
||||
organizationRelFSPointlocationsCtx = newContextual[bool]("fs_pointlocation.organization.fs_pointlocation.fs_pointlocation_organization_id_fkey")
|
||||
organizationRelFSPolygonlocationsCtx = newContextual[bool]("fs_polygonlocation.organization.fs_polygonlocation.fs_polygonlocation_organization_id_fkey")
|
||||
organizationRelFSPoolsCtx = newContextual[bool]("fs_pool.organization.fs_pool.fs_pool_organization_id_fkey")
|
||||
organizationRelFSPooldetailsCtx = newContextual[bool]("fs_pooldetail.organization.fs_pooldetail.fs_pooldetail_organization_id_fkey")
|
||||
organizationRelFSProposedtreatmentareasCtx = newContextual[bool]("fs_proposedtreatmentarea.organization.fs_proposedtreatmentarea.fs_proposedtreatmentarea_organization_id_fkey")
|
||||
organizationRelFSQamosquitoinspectionsCtx = newContextual[bool]("fs_qamosquitoinspection.organization.fs_qamosquitoinspection.fs_qamosquitoinspection_organization_id_fkey")
|
||||
organizationRelFSRodentlocationsCtx = newContextual[bool]("fs_rodentlocation.organization.fs_rodentlocation.fs_rodentlocation_organization_id_fkey")
|
||||
organizationRelFSSamplecollectionsCtx = newContextual[bool]("fs_samplecollection.organization.fs_samplecollection.fs_samplecollection_organization_id_fkey")
|
||||
organizationRelFSSamplelocationsCtx = newContextual[bool]("fs_samplelocation.organization.fs_samplelocation.fs_samplelocation_organization_id_fkey")
|
||||
organizationRelFSServicerequestsCtx = newContextual[bool]("fs_servicerequest.organization.fs_servicerequest.fs_servicerequest_organization_id_fkey")
|
||||
organizationRelFSSpeciesabundancesCtx = newContextual[bool]("fs_speciesabundance.organization.fs_speciesabundance.fs_speciesabundance_organization_id_fkey")
|
||||
organizationRelFSStormdrainsCtx = newContextual[bool]("fs_stormdrain.organization.fs_stormdrain.fs_stormdrain_organization_id_fkey")
|
||||
organizationRelFSTimecardsCtx = newContextual[bool]("fs_timecard.organization.fs_timecard.fs_timecard_organization_id_fkey")
|
||||
organizationRelFSTrapdataCtx = newContextual[bool]("fs_trapdata.organization.fs_trapdata.fs_trapdata_organization_id_fkey")
|
||||
organizationRelFSTraplocationsCtx = newContextual[bool]("fs_traplocation.organization.fs_traplocation.fs_traplocation_organization_id_fkey")
|
||||
organizationRelFSTreatmentsCtx = newContextual[bool]("fs_treatment.organization.fs_treatment.fs_treatment_organization_id_fkey")
|
||||
organizationRelFSTreatmentareasCtx = newContextual[bool]("fs_treatmentarea.organization.fs_treatmentarea.fs_treatmentarea_organization_id_fkey")
|
||||
organizationRelFSZonesCtx = newContextual[bool]("fs_zones.organization.fs_zones.fs_zones_organization_id_fkey")
|
||||
organizationRelFSZones2sCtx = newContextual[bool]("fs_zones2.organization.fs_zones2.fs_zones2_organization_id_fkey")
|
||||
organizationRelHistoryContainerrelatesCtx = newContextual[bool]("history_containerrelate.organization.history_containerrelate.history_containerrelate_organization_id_fkey")
|
||||
organizationRelHistoryFieldscoutinglogsCtx = newContextual[bool]("history_fieldscoutinglog.organization.history_fieldscoutinglog.history_fieldscoutinglog_organization_id_fkey")
|
||||
organizationRelHistoryHabitatrelatesCtx = newContextual[bool]("history_habitatrelate.organization.history_habitatrelate.history_habitatrelate_organization_id_fkey")
|
||||
organizationRelHistoryInspectionsamplesCtx = newContextual[bool]("history_inspectionsample.organization.history_inspectionsample.history_inspectionsample_organization_id_fkey")
|
||||
organizationRelHistoryInspectionsampledetailsCtx = newContextual[bool]("history_inspectionsampledetail.organization.history_inspectionsampledetail.history_inspectionsampledetail_organization_id_fkey")
|
||||
organizationRelHistoryLinelocationsCtx = newContextual[bool]("history_linelocation.organization.history_linelocation.history_linelocation_organization_id_fkey")
|
||||
organizationRelHistoryLocationtrackingsCtx = newContextual[bool]("history_locationtracking.organization.history_locationtracking.history_locationtracking_organization_id_fkey")
|
||||
organizationRelHistoryMosquitoinspectionsCtx = newContextual[bool]("history_mosquitoinspection.organization.history_mosquitoinspection.history_mosquitoinspection_organization_id_fkey")
|
||||
organizationRelHistoryPointlocationsCtx = newContextual[bool]("history_pointlocation.organization.history_pointlocation.history_pointlocation_organization_id_fkey")
|
||||
organizationRelHistoryPolygonlocationsCtx = newContextual[bool]("history_polygonlocation.organization.history_polygonlocation.history_polygonlocation_organization_id_fkey")
|
||||
organizationRelHistoryPoolsCtx = newContextual[bool]("history_pool.organization.history_pool.history_pool_organization_id_fkey")
|
||||
organizationRelHistoryPooldetailsCtx = newContextual[bool]("history_pooldetail.organization.history_pooldetail.history_pooldetail_organization_id_fkey")
|
||||
organizationRelHistoryProposedtreatmentareasCtx = newContextual[bool]("history_proposedtreatmentarea.organization.history_proposedtreatmentarea.history_proposedtreatmentarea_organization_id_fkey")
|
||||
organizationRelHistoryQamosquitoinspectionsCtx = newContextual[bool]("history_qamosquitoinspection.organization.history_qamosquitoinspection.history_qamosquitoinspection_organization_id_fkey")
|
||||
organizationRelHistoryRodentlocationsCtx = newContextual[bool]("history_rodentlocation.organization.history_rodentlocation.history_rodentlocation_organization_id_fkey")
|
||||
organizationRelHistorySamplecollectionsCtx = newContextual[bool]("history_samplecollection.organization.history_samplecollection.history_samplecollection_organization_id_fkey")
|
||||
organizationRelHistorySamplelocationsCtx = newContextual[bool]("history_samplelocation.organization.history_samplelocation.history_samplelocation_organization_id_fkey")
|
||||
organizationRelHistoryServicerequestsCtx = newContextual[bool]("history_servicerequest.organization.history_servicerequest.history_servicerequest_organization_id_fkey")
|
||||
organizationRelHistorySpeciesabundancesCtx = newContextual[bool]("history_speciesabundance.organization.history_speciesabundance.history_speciesabundance_organization_id_fkey")
|
||||
organizationRelHistoryStormdrainsCtx = newContextual[bool]("history_stormdrain.organization.history_stormdrain.history_stormdrain_organization_id_fkey")
|
||||
organizationRelHistoryTimecardsCtx = newContextual[bool]("history_timecard.organization.history_timecard.history_timecard_organization_id_fkey")
|
||||
organizationRelHistoryTrapdataCtx = newContextual[bool]("history_trapdata.organization.history_trapdata.history_trapdata_organization_id_fkey")
|
||||
organizationRelHistoryTraplocationsCtx = newContextual[bool]("history_traplocation.organization.history_traplocation.history_traplocation_organization_id_fkey")
|
||||
organizationRelHistoryTreatmentsCtx = newContextual[bool]("history_treatment.organization.history_treatment.history_treatment_organization_id_fkey")
|
||||
organizationRelHistoryTreatmentareasCtx = newContextual[bool]("history_treatmentarea.organization.history_treatmentarea.history_treatmentarea_organization_id_fkey")
|
||||
organizationRelHistoryZonesCtx = newContextual[bool]("history_zones.organization.history_zones.history_zones_organization_id_fkey")
|
||||
organizationRelHistoryZones2sCtx = newContextual[bool]("history_zones2.organization.history_zones2.history_zones2_organization_id_fkey")
|
||||
organizationRelUserCtx = newContextual[bool]("organization.user_.user_.user__organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for sessions
|
||||
sessionWithParentsCascadingCtx = newContextual[bool]("sessionWithParentsCascading")
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -4,6 +4,7 @@
|
|||
package factory
|
||||
|
||||
import (
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
|
@ -50,6 +51,43 @@ func random_enums_Hashtype(f *faker.Faker, limits ...string) enums.Hashtype {
|
|||
return all[f.IntBetween(0, len(all)-1)]
|
||||
}
|
||||
|
||||
func random_float64(f *faker.Faker, limits ...string) float64 {
|
||||
if f == nil {
|
||||
f = &defaultFaker
|
||||
}
|
||||
|
||||
var precision int64 = 5
|
||||
var scale int64 = 2
|
||||
|
||||
if len(limits) > 0 {
|
||||
precision, _ = strconv.ParseInt(limits[0], 10, 32)
|
||||
}
|
||||
|
||||
if len(limits) > 1 {
|
||||
scale, _ = strconv.ParseInt(limits[1], 10, 32)
|
||||
}
|
||||
|
||||
baseVal := f.Float64(10, -1, 1)
|
||||
for baseVal == -1 || baseVal == 0 || baseVal == 1 {
|
||||
baseVal = f.Float64(10, -1, 1)
|
||||
}
|
||||
|
||||
scaleFloat := math.Pow10(int(scale))
|
||||
|
||||
val := baseVal * math.Pow10(int(precision))
|
||||
val = math.Trunc(val) / scaleFloat
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
func random_int16(f *faker.Faker, limits ...string) int16 {
|
||||
if f == nil {
|
||||
f = &defaultFaker
|
||||
}
|
||||
|
||||
return f.Int16()
|
||||
}
|
||||
|
||||
func random_int32(f *faker.Faker, limits ...string) int32 {
|
||||
if f == nil {
|
||||
f = &defaultFaker
|
||||
|
|
|
|||
|
|
@ -24,6 +24,28 @@ func TestRandom___byte(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestRandom_float64(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
val1 := random_float64(nil)
|
||||
val2 := random_float64(nil)
|
||||
|
||||
if val1 == val2 {
|
||||
t.Fatalf("random_float64() returned the same value twice: %v", val1)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRandom_int16(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
val1 := random_int16(nil)
|
||||
val2 := random_int16(nil)
|
||||
|
||||
if val1 == val2 {
|
||||
t.Fatalf("random_int16() returned the same value twice: %v", val1)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRandom_int32(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
|||
1360
factory/fs_containerrelate.bob.go
Normal file
1360
factory/fs_containerrelate.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1174
factory/fs_fieldscoutinglog.bob.go
Normal file
1174
factory/fs_fieldscoutinglog.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1236
factory/fs_habitatrelate.bob.go
Normal file
1236
factory/fs_habitatrelate.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1360
factory/fs_inspectionsample.bob.go
Normal file
1360
factory/fs_inspectionsample.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2042
factory/fs_inspectionsampledetail.bob.go
Normal file
2042
factory/fs_inspectionsampledetail.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3468
factory/fs_linelocation.bob.go
Normal file
3468
factory/fs_linelocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1236
factory/fs_locationtracking.bob.go
Normal file
1236
factory/fs_locationtracking.bob.go
Normal file
File diff suppressed because it is too large
Load diff
4026
factory/fs_mosquitoinspection.bob.go
Normal file
4026
factory/fs_mosquitoinspection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3220
factory/fs_pointlocation.bob.go
Normal file
3220
factory/fs_pointlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3096
factory/fs_polygonlocation.bob.go
Normal file
3096
factory/fs_polygonlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2228
factory/fs_pool.bob.go
Normal file
2228
factory/fs_pool.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1360
factory/fs_pooldetail.bob.go
Normal file
1360
factory/fs_pooldetail.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2538
factory/fs_proposedtreatmentarea.bob.go
Normal file
2538
factory/fs_proposedtreatmentarea.bob.go
Normal file
File diff suppressed because it is too large
Load diff
4336
factory/fs_qamosquitoinspection.bob.go
Normal file
4336
factory/fs_qamosquitoinspection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2352
factory/fs_rodentlocation.bob.go
Normal file
2352
factory/fs_rodentlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3344
factory/fs_samplecollection.bob.go
Normal file
3344
factory/fs_samplecollection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1980
factory/fs_samplelocation.bob.go
Normal file
1980
factory/fs_samplelocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
5824
factory/fs_servicerequest.bob.go
Normal file
5824
factory/fs_servicerequest.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2290
factory/fs_speciesabundance.bob.go
Normal file
2290
factory/fs_speciesabundance.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1670
factory/fs_stormdrain.bob.go
Normal file
1670
factory/fs_stormdrain.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2228
factory/fs_timecard.bob.go
Normal file
2228
factory/fs_timecard.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3096
factory/fs_trapdata.bob.go
Normal file
3096
factory/fs_trapdata.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2352
factory/fs_traplocation.bob.go
Normal file
2352
factory/fs_traplocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3840
factory/fs_treatment.bob.go
Normal file
3840
factory/fs_treatment.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1608
factory/fs_treatmentarea.bob.go
Normal file
1608
factory/fs_treatmentarea.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1360
factory/fs_zones.bob.go
Normal file
1360
factory/fs_zones.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1298
factory/fs_zones2.bob.go
Normal file
1298
factory/fs_zones2.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1363
factory/history_containerrelate.bob.go
Normal file
1363
factory/history_containerrelate.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1177
factory/history_fieldscoutinglog.bob.go
Normal file
1177
factory/history_fieldscoutinglog.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1239
factory/history_habitatrelate.bob.go
Normal file
1239
factory/history_habitatrelate.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1363
factory/history_inspectionsample.bob.go
Normal file
1363
factory/history_inspectionsample.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2045
factory/history_inspectionsampledetail.bob.go
Normal file
2045
factory/history_inspectionsampledetail.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3471
factory/history_linelocation.bob.go
Normal file
3471
factory/history_linelocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1239
factory/history_locationtracking.bob.go
Normal file
1239
factory/history_locationtracking.bob.go
Normal file
File diff suppressed because it is too large
Load diff
4029
factory/history_mosquitoinspection.bob.go
Normal file
4029
factory/history_mosquitoinspection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3223
factory/history_pointlocation.bob.go
Normal file
3223
factory/history_pointlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3099
factory/history_polygonlocation.bob.go
Normal file
3099
factory/history_polygonlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2231
factory/history_pool.bob.go
Normal file
2231
factory/history_pool.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1363
factory/history_pooldetail.bob.go
Normal file
1363
factory/history_pooldetail.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2541
factory/history_proposedtreatmentarea.bob.go
Normal file
2541
factory/history_proposedtreatmentarea.bob.go
Normal file
File diff suppressed because it is too large
Load diff
4339
factory/history_qamosquitoinspection.bob.go
Normal file
4339
factory/history_qamosquitoinspection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2355
factory/history_rodentlocation.bob.go
Normal file
2355
factory/history_rodentlocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3347
factory/history_samplecollection.bob.go
Normal file
3347
factory/history_samplecollection.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1983
factory/history_samplelocation.bob.go
Normal file
1983
factory/history_samplelocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
5827
factory/history_servicerequest.bob.go
Normal file
5827
factory/history_servicerequest.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2293
factory/history_speciesabundance.bob.go
Normal file
2293
factory/history_speciesabundance.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1673
factory/history_stormdrain.bob.go
Normal file
1673
factory/history_stormdrain.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2231
factory/history_timecard.bob.go
Normal file
2231
factory/history_timecard.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3099
factory/history_trapdata.bob.go
Normal file
3099
factory/history_trapdata.bob.go
Normal file
File diff suppressed because it is too large
Load diff
2355
factory/history_traplocation.bob.go
Normal file
2355
factory/history_traplocation.bob.go
Normal file
File diff suppressed because it is too large
Load diff
3843
factory/history_treatment.bob.go
Normal file
3843
factory/history_treatment.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1611
factory/history_treatmentarea.bob.go
Normal file
1611
factory/history_treatmentarea.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1363
factory/history_zones.bob.go
Normal file
1363
factory/history_zones.bob.go
Normal file
File diff suppressed because it is too large
Load diff
1301
factory/history_zones2.bob.go
Normal file
1301
factory/history_zones2.bob.go
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue