Make fieldseeker tables key on globalid, version
This is because the objectid is not unique between organizations.
This commit is contained in:
parent
d02d34cbaa
commit
e18ce6a09e
110 changed files with 10602 additions and 486 deletions
|
|
@ -7,7 +7,7 @@ var FieldseekerContainerrelateErrors = &fieldseekerContainerrelateErrors{
|
|||
ErrUniqueContainerrelatePkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "containerrelate",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "containerrelate_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerFieldscoutinglogErrors = &fieldseekerFieldscoutinglogErrors{
|
|||
ErrUniqueFieldscoutinglogPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "fieldscoutinglog",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "fieldscoutinglog_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerHabitatrelateErrors = &fieldseekerHabitatrelateErrors{
|
|||
ErrUniqueHabitatrelatePkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "habitatrelate",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "habitatrelate_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerInspectionsampleErrors = &fieldseekerInspectionsampleErrors{
|
|||
ErrUniqueInspectionsamplePkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "inspectionsample",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "inspectionsample_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerInspectionsampledetailErrors = &fieldseekerInspectionsampledetail
|
|||
ErrUniqueInspectionsampledetailPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "inspectionsampledetail",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "inspectionsampledetail_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerLinelocationErrors = &fieldseekerLinelocationErrors{
|
|||
ErrUniqueLinelocationPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "linelocation",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "linelocation_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerLocationtrackingErrors = &fieldseekerLocationtrackingErrors{
|
|||
ErrUniqueLocationtrackingPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "locationtracking",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "locationtracking_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerMosquitoinspectionErrors = &fieldseekerMosquitoinspectionErrors{
|
|||
ErrUniqueMosquitoinspectionPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "mosquitoinspection",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "mosquitoinspection_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerPointlocationErrors = &fieldseekerPointlocationErrors{
|
|||
ErrUniquePointlocationPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "pointlocation",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "pointlocation_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerPolygonlocationErrors = &fieldseekerPolygonlocationErrors{
|
|||
ErrUniquePolygonlocationPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "polygonlocation",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "polygonlocation_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerPoolErrors = &fieldseekerPoolErrors{
|
|||
ErrUniquePoolPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "pool",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "pool_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerPooldetailErrors = &fieldseekerPooldetailErrors{
|
|||
ErrUniquePooldetailPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "pooldetail",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "pooldetail_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerProposedtreatmentareaErrors = &fieldseekerProposedtreatmentareaEr
|
|||
ErrUniqueProposedtreatmentareaPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "proposedtreatmentarea",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "proposedtreatmentarea_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerQamosquitoinspectionErrors = &fieldseekerQamosquitoinspectionErro
|
|||
ErrUniqueQamosquitoinspectionPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "qamosquitoinspection",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "qamosquitoinspection_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerRodentlocationErrors = &fieldseekerRodentlocationErrors{
|
|||
ErrUniqueRodentlocationPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "rodentlocation",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "rodentlocation_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerSamplecollectionErrors = &fieldseekerSamplecollectionErrors{
|
|||
ErrUniqueSamplecollectionPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "samplecollection",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "samplecollection_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerSamplelocationErrors = &fieldseekerSamplelocationErrors{
|
|||
ErrUniqueSamplelocationPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "samplelocation",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "samplelocation_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerServicerequestErrors = &fieldseekerServicerequestErrors{
|
|||
ErrUniqueServicerequestPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "servicerequest",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "servicerequest_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerSpeciesabundanceErrors = &fieldseekerSpeciesabundanceErrors{
|
|||
ErrUniqueSpeciesabundancePkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "speciesabundance",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "speciesabundance_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerStormdrainErrors = &fieldseekerStormdrainErrors{
|
|||
ErrUniqueStormdrainPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "stormdrain",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "stormdrain_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerTimecardErrors = &fieldseekerTimecardErrors{
|
|||
ErrUniqueTimecardPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "timecard",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "timecard_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerTrapdatumErrors = &fieldseekerTrapdatumErrors{
|
|||
ErrUniqueTrapdataPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "trapdata",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "trapdata_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerTraplocationErrors = &fieldseekerTraplocationErrors{
|
|||
ErrUniqueTraplocationPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "traplocation",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "traplocation_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerTreatmentErrors = &fieldseekerTreatmentErrors{
|
|||
ErrUniqueTreatmentPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "treatment",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "treatment_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerTreatmentareaErrors = &fieldseekerTreatmentareaErrors{
|
|||
ErrUniqueTreatmentareaPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "treatmentarea",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "treatmentarea_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerZoneErrors = &fieldseekerZoneErrors{
|
|||
ErrUniqueZonesPkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "zones",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "zones_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ var FieldseekerZones2Errors = &fieldseekerZones2Errors{
|
|||
ErrUniqueZones2Pkey: &UniqueConstraintError{
|
||||
schema: "fieldseeker",
|
||||
table: "zones2",
|
||||
columns: []string{"objectid", "version"},
|
||||
columns: []string{"globalid", "version"},
|
||||
s: "zones2_pkey",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerContainerrelates = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.containerrelate_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -184,7 +184,7 @@ var FieldseekerContainerrelates = Table[
|
|||
Name: "containerrelate_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -204,7 +204,7 @@ var FieldseekerContainerrelates = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "containerrelate_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerContainerrelateForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerFieldscoutinglogs = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.fieldscoutinglog_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -157,7 +157,7 @@ var FieldseekerFieldscoutinglogs = Table[
|
|||
Name: "fieldscoutinglog_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -177,7 +177,7 @@ var FieldseekerFieldscoutinglogs = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "fieldscoutinglog_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerFieldscoutinglogForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerHabitatrelates = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.habitatrelate_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -166,7 +166,7 @@ var FieldseekerHabitatrelates = Table[
|
|||
Name: "habitatrelate_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -186,7 +186,7 @@ var FieldseekerHabitatrelates = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "habitatrelate_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerHabitatrelateForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerInspectionsamples = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.inspectionsample_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -184,7 +184,7 @@ var FieldseekerInspectionsamples = Table[
|
|||
Name: "inspectionsample_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -204,7 +204,7 @@ var FieldseekerInspectionsamples = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "inspectionsample_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerInspectionsampleForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerInspectionsampledetails = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.inspectionsampledetail_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -283,7 +283,7 @@ var FieldseekerInspectionsampledetails = Table[
|
|||
Name: "inspectionsampledetail_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -303,7 +303,7 @@ var FieldseekerInspectionsampledetails = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "inspectionsampledetail_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerInspectionsampledetailForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerLinelocations = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.linelocation_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -490,7 +490,7 @@ var FieldseekerLinelocations = Table[
|
|||
Name: "linelocation_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -510,7 +510,7 @@ var FieldseekerLinelocations = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "linelocation_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerLinelocationForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerLocationtrackings = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.locationtracking_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -166,7 +166,7 @@ var FieldseekerLocationtrackings = Table[
|
|||
Name: "locationtracking_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -186,7 +186,7 @@ var FieldseekerLocationtrackings = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "locationtracking_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerLocationtrackingForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerMosquitoinspections = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.mosquitoinspection_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -571,7 +571,7 @@ var FieldseekerMosquitoinspections = Table[
|
|||
Name: "mosquitoinspection_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -591,7 +591,7 @@ var FieldseekerMosquitoinspections = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "mosquitoinspection_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerMosquitoinspectionForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerPointlocations = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.pointlocation_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -463,7 +463,7 @@ var FieldseekerPointlocations = Table[
|
|||
Name: "pointlocation_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -483,7 +483,7 @@ var FieldseekerPointlocations = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "pointlocation_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerPointlocationForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerPolygonlocations = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.polygonlocation_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -436,7 +436,7 @@ var FieldseekerPolygonlocations = Table[
|
|||
Name: "polygonlocation_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -456,7 +456,7 @@ var FieldseekerPolygonlocations = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "polygonlocation_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerPolygonlocationForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerPools = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.pool_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -310,7 +310,7 @@ var FieldseekerPools = Table[
|
|||
Name: "pool_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -330,7 +330,7 @@ var FieldseekerPools = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "pool_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerPoolForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerPooldetails = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.pooldetail_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -184,7 +184,7 @@ var FieldseekerPooldetails = Table[
|
|||
Name: "pooldetail_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -204,7 +204,7 @@ var FieldseekerPooldetails = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "pooldetail_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerPooldetailForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerProposedtreatmentareas = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.proposedtreatmentarea_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -355,7 +355,7 @@ var FieldseekerProposedtreatmentareas = Table[
|
|||
Name: "proposedtreatmentarea_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -375,7 +375,7 @@ var FieldseekerProposedtreatmentareas = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "proposedtreatmentarea_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerProposedtreatmentareaForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerQamosquitoinspections = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.qamosquitoinspection_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -616,7 +616,7 @@ var FieldseekerQamosquitoinspections = Table[
|
|||
Name: "qamosquitoinspection_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -636,7 +636,7 @@ var FieldseekerQamosquitoinspections = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "qamosquitoinspection_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerQamosquitoinspectionForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.rodentlocation_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -328,7 +328,7 @@ var FieldseekerRodentlocations = Table[
|
|||
Name: "rodentlocation_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -348,7 +348,7 @@ var FieldseekerRodentlocations = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "rodentlocation_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerRodentlocationForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerSamplecollections = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.samplecollection_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -472,7 +472,7 @@ var FieldseekerSamplecollections = Table[
|
|||
Name: "samplecollection_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -492,7 +492,7 @@ var FieldseekerSamplecollections = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "samplecollection_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerSamplecollectionForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerSamplelocations = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.samplelocation_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -274,7 +274,7 @@ var FieldseekerSamplelocations = Table[
|
|||
Name: "samplelocation_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -294,7 +294,7 @@ var FieldseekerSamplelocations = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "samplelocation_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerSamplelocationForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerServicerequests = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.servicerequest_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -841,7 +841,7 @@ var FieldseekerServicerequests = Table[
|
|||
Name: "servicerequest_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -861,7 +861,7 @@ var FieldseekerServicerequests = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "servicerequest_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerServicerequestForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerSpeciesabundances = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.speciesabundance_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -319,7 +319,7 @@ var FieldseekerSpeciesabundances = Table[
|
|||
Name: "speciesabundance_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -339,7 +339,7 @@ var FieldseekerSpeciesabundances = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "speciesabundance_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerSpeciesabundanceForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerStormdrains = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.stormdrain_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -229,7 +229,7 @@ var FieldseekerStormdrains = Table[
|
|||
Name: "stormdrain_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -249,7 +249,7 @@ var FieldseekerStormdrains = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "stormdrain_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerStormdrainForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerTimecards = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.timecard_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -310,7 +310,7 @@ var FieldseekerTimecards = Table[
|
|||
Name: "timecard_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -330,7 +330,7 @@ var FieldseekerTimecards = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "timecard_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerTimecardForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerTrapdata = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.trapdata_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -445,7 +445,7 @@ var FieldseekerTrapdata = Table[
|
|||
Name: "trapdata_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -465,7 +465,7 @@ var FieldseekerTrapdata = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "trapdata_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerTrapdatumForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerTraplocations = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.traplocation_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -328,7 +328,7 @@ var FieldseekerTraplocations = Table[
|
|||
Name: "traplocation_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -348,7 +348,7 @@ var FieldseekerTraplocations = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "traplocation_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerTraplocationForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerTreatments = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.treatment_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -553,7 +553,7 @@ var FieldseekerTreatments = Table[
|
|||
Name: "treatment_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -573,7 +573,7 @@ var FieldseekerTreatments = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "treatment_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerTreatmentForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerTreatmentareas = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.treatmentarea_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -220,7 +220,7 @@ var FieldseekerTreatmentareas = Table[
|
|||
Name: "treatmentarea_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -240,7 +240,7 @@ var FieldseekerTreatmentareas = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "treatmentarea_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerTreatmentareaForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerZones = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.zones_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -184,7 +184,7 @@ var FieldseekerZones = Table[
|
|||
Name: "zones_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -204,7 +204,7 @@ var FieldseekerZones = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "zones_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerZoneForeignKeys{
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var FieldseekerZones2s = Table[
|
|||
Objectid: column{
|
||||
Name: "objectid",
|
||||
DBType: "bigint",
|
||||
Default: "nextval('fieldseeker.zones2_objectid_seq'::regclass)",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
|
|
@ -175,7 +175,7 @@ var FieldseekerZones2s = Table[
|
|||
Name: "zones2_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "objectid",
|
||||
Name: "globalid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
|
|
@ -195,7 +195,7 @@ var FieldseekerZones2s = Table[
|
|||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "zones2_pkey",
|
||||
Columns: []string{"objectid", "version"},
|
||||
Columns: []string{"globalid", "version"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignKeys: fieldseekerZones2ForeignKeys{
|
||||
|
|
|
|||
|
|
@ -264,6 +264,10 @@ func (o FieldseekerContainerrelateTemplate) BuildMany(number int) models.Fieldse
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerContainerrelate(m *models.FieldseekerContainerrelateSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -240,6 +240,10 @@ func (o FieldseekerFieldscoutinglogTemplate) BuildMany(number int) models.Fields
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerFieldscoutinglog(m *models.FieldseekerFieldscoutinglogSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -248,6 +248,10 @@ func (o FieldseekerHabitatrelateTemplate) BuildMany(number int) models.Fieldseek
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerHabitatrelate(m *models.FieldseekerHabitatrelateSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -264,6 +264,10 @@ func (o FieldseekerInspectionsampleTemplate) BuildMany(number int) models.Fields
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerInspectionsample(m *models.FieldseekerInspectionsampleSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -352,6 +352,10 @@ func (o FieldseekerInspectionsampledetailTemplate) BuildMany(number int) models.
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerInspectionsampledetail(m *models.FieldseekerInspectionsampledetailSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -536,6 +536,10 @@ func (o FieldseekerLinelocationTemplate) BuildMany(number int) models.Fieldseeke
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerLinelocation(m *models.FieldseekerLinelocationSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -248,6 +248,10 @@ func (o FieldseekerLocationtrackingTemplate) BuildMany(number int) models.Fields
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerLocationtracking(m *models.FieldseekerLocationtrackingSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -608,6 +608,10 @@ func (o FieldseekerMosquitoinspectionTemplate) BuildMany(number int) models.Fiel
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerMosquitoinspection(m *models.FieldseekerMosquitoinspectionSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -508,6 +508,10 @@ func (o FieldseekerPointlocationTemplate) BuildMany(number int) models.Fieldseek
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerPointlocation(m *models.FieldseekerPointlocationSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -488,6 +488,10 @@ func (o FieldseekerPolygonlocationTemplate) BuildMany(number int) models.Fieldse
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerPolygonlocation(m *models.FieldseekerPolygonlocationSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -376,6 +376,10 @@ func (o FieldseekerPoolTemplate) BuildMany(number int) models.FieldseekerPoolSli
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerPool(m *models.FieldseekerPoolSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -264,6 +264,10 @@ func (o FieldseekerPooldetailTemplate) BuildMany(number int) models.FieldseekerP
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerPooldetail(m *models.FieldseekerPooldetailSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -416,6 +416,10 @@ func (o FieldseekerProposedtreatmentareaTemplate) BuildMany(number int) models.F
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerProposedtreatmentarea(m *models.FieldseekerProposedtreatmentareaSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -648,6 +648,10 @@ func (o FieldseekerQamosquitoinspectionTemplate) BuildMany(number int) models.Fi
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerQamosquitoinspection(m *models.FieldseekerQamosquitoinspectionSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -392,6 +392,10 @@ func (o FieldseekerRodentlocationTemplate) BuildMany(number int) models.Fieldsee
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerRodentlocation(m *models.FieldseekerRodentlocationSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -520,6 +520,10 @@ func (o FieldseekerSamplecollectionTemplate) BuildMany(number int) models.Fields
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerSamplecollection(m *models.FieldseekerSamplecollectionSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -344,6 +344,10 @@ func (o FieldseekerSamplelocationTemplate) BuildMany(number int) models.Fieldsee
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerSamplelocation(m *models.FieldseekerSamplelocationSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -844,6 +844,10 @@ func (o FieldseekerServicerequestTemplate) BuildMany(number int) models.Fieldsee
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerServicerequest(m *models.FieldseekerServicerequestSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -384,6 +384,10 @@ func (o FieldseekerSpeciesabundanceTemplate) BuildMany(number int) models.Fields
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerSpeciesabundance(m *models.FieldseekerSpeciesabundanceSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -304,6 +304,10 @@ func (o FieldseekerStormdrainTemplate) BuildMany(number int) models.FieldseekerS
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerStormdrain(m *models.FieldseekerStormdrainSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -376,6 +376,10 @@ func (o FieldseekerTimecardTemplate) BuildMany(number int) models.FieldseekerTim
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerTimecard(m *models.FieldseekerTimecardSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -492,6 +492,10 @@ func (o FieldseekerTrapdatumTemplate) BuildMany(number int) models.FieldseekerTr
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerTrapdatum(m *models.FieldseekerTrapdatumSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -392,6 +392,10 @@ func (o FieldseekerTraplocationTemplate) BuildMany(number int) models.Fieldseeke
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerTraplocation(m *models.FieldseekerTraplocationSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -588,6 +588,10 @@ func (o FieldseekerTreatmentTemplate) BuildMany(number int) models.FieldseekerTr
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerTreatment(m *models.FieldseekerTreatmentSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -296,6 +296,10 @@ func (o FieldseekerTreatmentareaTemplate) BuildMany(number int) models.Fieldseek
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerTreatmentarea(m *models.FieldseekerTreatmentareaSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -264,6 +264,10 @@ func (o FieldseekerZoneTemplate) BuildMany(number int) models.FieldseekerZoneSli
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerZone(m *models.FieldseekerZoneSetter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
|
|
@ -256,6 +256,10 @@ func (o FieldseekerZones2Template) BuildMany(number int) models.FieldseekerZones
|
|||
}
|
||||
|
||||
func ensureCreatableFieldseekerZones2(m *models.FieldseekerZones2Setter) {
|
||||
if !(m.Objectid.IsValue()) {
|
||||
val := random_int64(nil)
|
||||
m.Objectid = omit.From(val)
|
||||
}
|
||||
if !(m.Globalid.IsValue()) {
|
||||
val := random_uuid_UUID(nil)
|
||||
m.Globalid = omit.From(val)
|
||||
|
|
|
|||
138
db/migrations/00027_fix_fieldseeker_pkeys.sql
Normal file
138
db/migrations/00027_fix_fieldseeker_pkeys.sql
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
-- +goose Up
|
||||
ALTER TABLE fieldseeker.containerrelate DROP CONSTRAINT containerrelate_pkey;
|
||||
ALTER TABLE fieldseeker.containerrelate ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.containerrelate_objectid_seq;
|
||||
ALTER TABLE fieldseeker.containerrelate ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.fieldscoutinglog DROP CONSTRAINT fieldscoutinglog_pkey;
|
||||
ALTER TABLE fieldseeker.fieldscoutinglog ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.fieldscoutinglog_objectid_seq;
|
||||
ALTER TABLE fieldseeker.fieldscoutinglog ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.habitatrelate DROP CONSTRAINT habitatrelate_pkey;
|
||||
ALTER TABLE fieldseeker.habitatrelate ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.habitatrelate_objectid_seq;
|
||||
ALTER TABLE fieldseeker.habitatrelate ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.inspectionsample DROP CONSTRAINT inspectionsample_pkey;
|
||||
ALTER TABLE fieldseeker.inspectionsample ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.inspectionsample_objectid_seq;
|
||||
ALTER TABLE fieldseeker.inspectionsample ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.inspectionsampledetail DROP CONSTRAINT inspectionsampledetail_pkey;
|
||||
ALTER TABLE fieldseeker.inspectionsampledetail ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.inspectionsampledetail_objectid_seq;
|
||||
ALTER TABLE fieldseeker.inspectionsampledetail ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.linelocation DROP CONSTRAINT linelocation_pkey;
|
||||
ALTER TABLE fieldseeker.linelocation ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.linelocation_objectid_seq;
|
||||
ALTER TABLE fieldseeker.linelocation ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.locationtracking DROP CONSTRAINT locationtracking_pkey;
|
||||
ALTER TABLE fieldseeker.locationtracking ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.locationtracking_objectid_seq;
|
||||
ALTER TABLE fieldseeker.locationtracking ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.mosquitoinspection DROP CONSTRAINT mosquitoinspection_pkey;
|
||||
ALTER TABLE fieldseeker.mosquitoinspection ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.mosquitoinspection_objectid_seq;
|
||||
ALTER TABLE fieldseeker.mosquitoinspection ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.pointlocation DROP CONSTRAINT pointlocation_pkey;
|
||||
ALTER TABLE fieldseeker.pointlocation ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.pointlocation_objectid_seq;
|
||||
ALTER TABLE fieldseeker.pointlocation ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.polygonlocation DROP CONSTRAINT polygonlocation_pkey;
|
||||
ALTER TABLE fieldseeker.polygonlocation ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.polygonlocation_objectid_seq;
|
||||
ALTER TABLE fieldseeker.polygonlocation ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.pool DROP CONSTRAINT pool_pkey;
|
||||
ALTER TABLE fieldseeker.pool ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.pool_objectid_seq;
|
||||
ALTER TABLE fieldseeker.pool ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.pooldetail DROP CONSTRAINT pooldetail_pkey;
|
||||
ALTER TABLE fieldseeker.pooldetail ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.pooldetail_objectid_seq;
|
||||
ALTER TABLE fieldseeker.pooldetail ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.proposedtreatmentarea DROP CONSTRAINT proposedtreatmentarea_pkey;
|
||||
ALTER TABLE fieldseeker.proposedtreatmentarea ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.proposedtreatmentarea_objectid_seq;
|
||||
ALTER TABLE fieldseeker.proposedtreatmentarea ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.qamosquitoinspection DROP CONSTRAINT qamosquitoinspection_pkey;
|
||||
ALTER TABLE fieldseeker.qamosquitoinspection ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.qamosquitoinspection_objectid_seq;
|
||||
ALTER TABLE fieldseeker.qamosquitoinspection ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.rodentlocation DROP CONSTRAINT rodentlocation_pkey;
|
||||
ALTER TABLE fieldseeker.rodentlocation ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.rodentlocation_objectid_seq;
|
||||
ALTER TABLE fieldseeker.rodentlocation ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.samplecollection DROP CONSTRAINT samplecollection_pkey;
|
||||
ALTER TABLE fieldseeker.samplecollection ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.samplecollection_objectid_seq;
|
||||
ALTER TABLE fieldseeker.samplecollection ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.samplelocation DROP CONSTRAINT samplelocation_pkey;
|
||||
ALTER TABLE fieldseeker.samplelocation ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.samplelocation_objectid_seq;
|
||||
ALTER TABLE fieldseeker.samplelocation ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.servicerequest DROP CONSTRAINT servicerequest_pkey;
|
||||
ALTER TABLE fieldseeker.servicerequest ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.servicerequest_objectid_seq;
|
||||
ALTER TABLE fieldseeker.servicerequest ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.speciesabundance DROP CONSTRAINT speciesabundance_pkey;
|
||||
ALTER TABLE fieldseeker.speciesabundance ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.speciesabundance_objectid_seq;
|
||||
ALTER TABLE fieldseeker.speciesabundance ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.stormdrain DROP CONSTRAINT stormdrain_pkey;
|
||||
ALTER TABLE fieldseeker.stormdrain ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.stormdrain_objectid_seq;
|
||||
ALTER TABLE fieldseeker.stormdrain ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.timecard DROP CONSTRAINT timecard_pkey;
|
||||
ALTER TABLE fieldseeker.timecard ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.timecard_objectid_seq;
|
||||
ALTER TABLE fieldseeker.timecard ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.trapdata DROP CONSTRAINT trapdata_pkey;
|
||||
ALTER TABLE fieldseeker.trapdata ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.trapdata_objectid_seq;
|
||||
ALTER TABLE fieldseeker.trapdata ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.traplocation DROP CONSTRAINT traplocation_pkey;
|
||||
ALTER TABLE fieldseeker.traplocation ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.traplocation_objectid_seq;
|
||||
ALTER TABLE fieldseeker.traplocation ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.treatment DROP CONSTRAINT treatment_pkey;
|
||||
ALTER TABLE fieldseeker.treatment ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.treatment_objectid_seq;
|
||||
ALTER TABLE fieldseeker.treatment ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.treatmentarea DROP CONSTRAINT treatmentarea_pkey;
|
||||
ALTER TABLE fieldseeker.treatmentarea ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.treatmentarea_objectid_seq;
|
||||
ALTER TABLE fieldseeker.treatmentarea ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.zones DROP CONSTRAINT zones_pkey;
|
||||
ALTER TABLE fieldseeker.zones ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.zones_objectid_seq;
|
||||
ALTER TABLE fieldseeker.zones ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
ALTER TABLE fieldseeker.zones2 DROP CONSTRAINT zones2_pkey;
|
||||
ALTER TABLE fieldseeker.zones2 ALTER COLUMN objectid DROP DEFAULT;
|
||||
DROP SEQUENCE fieldseeker.zones2_objectid_seq;
|
||||
ALTER TABLE fieldseeker.zones2 ADD PRIMARY KEY (globalid, version);
|
||||
|
||||
-- +goose Down
|
||||
SELECT "not done" FROM non_existent;
|
||||
9870
db/migrations/00028_fieldseeker_function_globalid.sql
Normal file
9870
db/migrations/00028_fieldseeker_function_globalid.sql
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -29,9 +29,9 @@ import (
|
|||
|
||||
// FieldseekerContainerrelate is an object representing the database table.
|
||||
type FieldseekerContainerrelate struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -141,8 +141,8 @@ func (fieldseekerContainerrelateColumns) AliasedAs(alias string) fieldseekerCont
|
|||
// 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 omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -534,25 +534,25 @@ func (s FieldseekerContainerrelateSetter) Expressions(prefix ...string) []bob.Ex
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerContainerrelate, error) {
|
||||
func FindFieldseekerContainerrelate(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerContainerrelate, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerContainerrelateExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerContainerrelates.Query(
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -578,13 +578,13 @@ func (o *FieldseekerContainerrelate) AfterQueryHook(ctx context.Context, exec bo
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerContainerrelate
|
||||
func (o *FieldseekerContainerrelate) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerContainerrelate) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.containerrelate", "objectid"), psql.Quote("fieldseeker.containerrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.containerrelate", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -611,7 +611,7 @@ func (o *FieldseekerContainerrelate) Delete(ctx context.Context, exec bob.Execut
|
|||
// 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))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerContainerrelates.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -646,7 +646,7 @@ func (o FieldseekerContainerrelateSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.containerrelate", "objectid"), psql.Quote("fieldseeker.containerrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.containerrelate", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -661,7 +661,7 @@ func (o FieldseekerContainerrelateSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerContainerrelateSlice) copyMatchingRows(from ...*FieldseekerContainerrelate) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ import (
|
|||
|
||||
// FieldseekerFieldscoutinglog is an object representing the database table.
|
||||
type FieldseekerFieldscoutinglog struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is STATUS
|
||||
Status null.Val[int16] `db:"status" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -129,9 +129,9 @@ func (fieldseekerFieldscoutinglogColumns) AliasedAs(alias string) fieldseekerFie
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Status omitnull.Val[int16] `db:"status" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -462,25 +462,25 @@ func (s FieldseekerFieldscoutinglogSetter) Expressions(prefix ...string) []bob.E
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerFieldscoutinglog, error) {
|
||||
func FindFieldseekerFieldscoutinglog(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerFieldscoutinglog, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerFieldscoutinglogExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerFieldscoutinglogs.Query(
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -506,13 +506,13 @@ func (o *FieldseekerFieldscoutinglog) AfterQueryHook(ctx context.Context, exec b
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerFieldscoutinglog
|
||||
func (o *FieldseekerFieldscoutinglog) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerFieldscoutinglog) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.fieldscoutinglog", "objectid"), psql.Quote("fieldseeker.fieldscoutinglog", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.fieldscoutinglog", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -539,7 +539,7 @@ func (o *FieldseekerFieldscoutinglog) Delete(ctx context.Context, exec bob.Execu
|
|||
// 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))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerFieldscoutinglogs.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -574,7 +574,7 @@ func (o FieldseekerFieldscoutinglogSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.fieldscoutinglog", "objectid"), psql.Quote("fieldseeker.fieldscoutinglog", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.fieldscoutinglog", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -589,7 +589,7 @@ func (o FieldseekerFieldscoutinglogSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerFieldscoutinglogSlice) copyMatchingRows(from ...*FieldseekerFieldscoutinglog) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ import (
|
|||
|
||||
// FieldseekerHabitatrelate is an object representing the database table.
|
||||
type FieldseekerHabitatrelate struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is FOREIGN_ID
|
||||
ForeignID null.Val[uuid.UUID] `db:"foreign_id" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -133,9 +133,9 @@ func (fieldseekerHabitatrelateColumns) AliasedAs(alias string) fieldseekerHabita
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
ForeignID omitnull.Val[uuid.UUID] `db:"foreign_id" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -486,25 +486,25 @@ func (s FieldseekerHabitatrelateSetter) Expressions(prefix ...string) []bob.Expr
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerHabitatrelate, error) {
|
||||
func FindFieldseekerHabitatrelate(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerHabitatrelate, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerHabitatrelateExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerHabitatrelates.Query(
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -530,13 +530,13 @@ func (o *FieldseekerHabitatrelate) AfterQueryHook(ctx context.Context, exec bob.
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerHabitatrelate
|
||||
func (o *FieldseekerHabitatrelate) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerHabitatrelate) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.habitatrelate", "objectid"), psql.Quote("fieldseeker.habitatrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.habitatrelate", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -563,7 +563,7 @@ func (o *FieldseekerHabitatrelate) Delete(ctx context.Context, exec bob.Executor
|
|||
// 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))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerHabitatrelates.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -598,7 +598,7 @@ func (o FieldseekerHabitatrelateSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.habitatrelate", "objectid"), psql.Quote("fieldseeker.habitatrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.habitatrelate", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -613,7 +613,7 @@ func (o FieldseekerHabitatrelateSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerHabitatrelateSlice) copyMatchingRows(from ...*FieldseekerHabitatrelate) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerInspectionsample is an object representing the database table.
|
||||
type FieldseekerInspectionsample struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is INSP_ID
|
||||
InspID null.Val[uuid.UUID] `db:"insp_id" `
|
||||
// Original attribute from ArcGIS API is SAMPLEID
|
||||
|
|
@ -39,7 +39,7 @@ type FieldseekerInspectionsample struct {
|
|||
// Original attribute from ArcGIS API is IDBYTECH
|
||||
Idbytech null.Val[string] `db:"idbytech" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -141,12 +141,12 @@ func (fieldseekerInspectionsampleColumns) AliasedAs(alias string) fieldseekerIns
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
InspID omitnull.Val[uuid.UUID] `db:"insp_id" `
|
||||
Sampleid omitnull.Val[string] `db:"sampleid" `
|
||||
Processed omitnull.Val[int16] `db:"processed" `
|
||||
Idbytech omitnull.Val[string] `db:"idbytech" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -534,25 +534,25 @@ func (s FieldseekerInspectionsampleSetter) Expressions(prefix ...string) []bob.E
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerInspectionsample, error) {
|
||||
func FindFieldseekerInspectionsample(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerInspectionsample, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerInspectionsampleExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerInspectionsamples.Query(
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -578,13 +578,13 @@ func (o *FieldseekerInspectionsample) AfterQueryHook(ctx context.Context, exec b
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerInspectionsample
|
||||
func (o *FieldseekerInspectionsample) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerInspectionsample) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsample", "objectid"), psql.Quote("fieldseeker.inspectionsample", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsample", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -611,7 +611,7 @@ func (o *FieldseekerInspectionsample) Delete(ctx context.Context, exec bob.Execu
|
|||
// 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))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerInspectionsamples.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -646,7 +646,7 @@ func (o FieldseekerInspectionsampleSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsample", "objectid"), psql.Quote("fieldseeker.inspectionsample", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsample", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -661,7 +661,7 @@ func (o FieldseekerInspectionsampleSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerInspectionsampleSlice) copyMatchingRows(from ...*FieldseekerInspectionsample) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerInspectionsampledetail is an object representing the database table.
|
||||
type FieldseekerInspectionsampledetail struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is INSPSAMPLE_ID
|
||||
InspsampleID null.Val[uuid.UUID] `db:"inspsample_id" `
|
||||
// Original attribute from ArcGIS API is FIELDSPECIES
|
||||
|
|
@ -59,7 +59,7 @@ type FieldseekerInspectionsampledetail struct {
|
|||
// Original attribute from ArcGIS API is COMMENTS
|
||||
Comments null.Val[string] `db:"comments" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -185,7 +185,7 @@ func (fieldseekerInspectionsampledetailColumns) AliasedAs(alias string) fieldsee
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
InspsampleID omitnull.Val[uuid.UUID] `db:"inspsample_id" `
|
||||
Fieldspecies omitnull.Val[string] `db:"fieldspecies" `
|
||||
Flarvcount omitnull.Val[int16] `db:"flarvcount" `
|
||||
|
|
@ -200,7 +200,7 @@ type FieldseekerInspectionsampledetailSetter struct {
|
|||
Leggcount omitnull.Val[int16] `db:"leggcount" `
|
||||
Ldomstage omitnull.Val[string] `db:"ldomstage" `
|
||||
Comments omitnull.Val[string] `db:"comments" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -798,25 +798,25 @@ func (s FieldseekerInspectionsampledetailSetter) Expressions(prefix ...string) [
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerInspectionsampledetail, error) {
|
||||
func FindFieldseekerInspectionsampledetail(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerInspectionsampledetail, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerInspectionsampledetailExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerInspectionsampledetails.Query(
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -842,13 +842,13 @@ func (o *FieldseekerInspectionsampledetail) AfterQueryHook(ctx context.Context,
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerInspectionsampledetail
|
||||
func (o *FieldseekerInspectionsampledetail) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerInspectionsampledetail) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsampledetail", "objectid"), psql.Quote("fieldseeker.inspectionsampledetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsampledetail", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -875,7 +875,7 @@ func (o *FieldseekerInspectionsampledetail) Delete(ctx context.Context, exec bob
|
|||
// 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))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerInspectionsampledetails.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -910,7 +910,7 @@ func (o FieldseekerInspectionsampledetailSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsampledetail", "objectid"), psql.Quote("fieldseeker.inspectionsampledetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.inspectionsampledetail", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -925,7 +925,7 @@ func (o FieldseekerInspectionsampledetailSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerInspectionsampledetailSlice) copyMatchingRows(from ...*FieldseekerInspectionsampledetail) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerLinelocation is an object representing the database table.
|
||||
type FieldseekerLinelocation struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is NAME
|
||||
Name null.Val[string] `db:"name" `
|
||||
// Original attribute from ArcGIS API is ZONE
|
||||
|
|
@ -67,7 +67,7 @@ type FieldseekerLinelocation struct {
|
|||
// Original attribute from ArcGIS API is LOCATIONNUMBER
|
||||
Locationnumber null.Val[int32] `db:"locationnumber" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -277,7 +277,7 @@ func (fieldseekerLinelocationColumns) AliasedAs(alias string) fieldseekerLineloc
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerLinelocationSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Habitat omitnull.Val[string] `db:"habitat" `
|
||||
|
|
@ -296,7 +296,7 @@ type FieldseekerLinelocationSetter struct {
|
|||
WidthFT omitnull.Val[float64] `db:"width_ft" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Locationnumber omitnull.Val[int32] `db:"locationnumber" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -1350,25 +1350,25 @@ func (s FieldseekerLinelocationSetter) Expressions(prefix ...string) []bob.Expre
|
|||
|
||||
// FindFieldseekerLinelocation retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerLinelocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerLinelocation, error) {
|
||||
func FindFieldseekerLinelocation(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerLinelocation, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerLinelocations.Query(
|
||||
sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerLinelocations.Query(
|
||||
sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerLinelocations.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerLinelocationExists checks the presence of a single record by primary key
|
||||
func FieldseekerLinelocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerLinelocationExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerLinelocations.Query(
|
||||
sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1394,13 +1394,13 @@ func (o *FieldseekerLinelocation) AfterQueryHook(ctx context.Context, exec bob.E
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerLinelocation
|
||||
func (o *FieldseekerLinelocation) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerLinelocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.linelocation", "objectid"), psql.Quote("fieldseeker.linelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.linelocation", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1427,7 +1427,7 @@ func (o *FieldseekerLinelocation) Delete(ctx context.Context, exec bob.Executor)
|
|||
// Reload refreshes the FieldseekerLinelocation using the executor
|
||||
func (o *FieldseekerLinelocation) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerLinelocations.Query(
|
||||
sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerLinelocations.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1462,7 +1462,7 @@ func (o FieldseekerLinelocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.linelocation", "objectid"), psql.Quote("fieldseeker.linelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.linelocation", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1477,7 +1477,7 @@ func (o FieldseekerLinelocationSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerLinelocationSlice) copyMatchingRows(from ...*FieldseekerLinelocation) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerLocationtracking is an object representing the database table.
|
||||
type FieldseekerLocationtracking struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is Accuracy
|
||||
Accuracy null.Val[float64] `db:"accuracy" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
|
|
@ -41,7 +41,7 @@ type FieldseekerLocationtracking struct {
|
|||
// Original attribute from ArcGIS API is last_edited_date
|
||||
LastEditedDate null.Val[time.Time] `db:"last_edited_date" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is FIELDTECH
|
||||
Fieldtech null.Val[string] `db:"fieldtech" `
|
||||
// Original attribute from ArcGIS API is CreationDate
|
||||
|
|
@ -133,13 +133,13 @@ func (fieldseekerLocationtrackingColumns) AliasedAs(alias string) fieldseekerLoc
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
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 omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
Fieldtech omitnull.Val[string] `db:"fieldtech" `
|
||||
Creationdate omitnull.Val[time.Time] `db:"creationdate" `
|
||||
Creator omitnull.Val[string] `db:"creator" `
|
||||
|
|
@ -486,25 +486,25 @@ func (s FieldseekerLocationtrackingSetter) Expressions(prefix ...string) []bob.E
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerLocationtracking, error) {
|
||||
func FindFieldseekerLocationtracking(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerLocationtracking, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerLocationtrackingExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerLocationtrackings.Query(
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -530,13 +530,13 @@ func (o *FieldseekerLocationtracking) AfterQueryHook(ctx context.Context, exec b
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerLocationtracking
|
||||
func (o *FieldseekerLocationtracking) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerLocationtracking) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.locationtracking", "objectid"), psql.Quote("fieldseeker.locationtracking", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.locationtracking", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -563,7 +563,7 @@ func (o *FieldseekerLocationtracking) Delete(ctx context.Context, exec bob.Execu
|
|||
// 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))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerLocationtrackings.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -598,7 +598,7 @@ func (o FieldseekerLocationtrackingSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.locationtracking", "objectid"), psql.Quote("fieldseeker.locationtracking", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.locationtracking", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -613,7 +613,7 @@ func (o FieldseekerLocationtrackingSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerLocationtrackingSlice) copyMatchingRows(from ...*FieldseekerLocationtracking) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerMosquitoinspection is an object representing the database table.
|
||||
type FieldseekerMosquitoinspection struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is NUMDIPS
|
||||
Numdips null.Val[int16] `db:"numdips" `
|
||||
// Original attribute from ArcGIS API is ACTIVITY
|
||||
|
|
@ -95,7 +95,7 @@ type FieldseekerMosquitoinspection struct {
|
|||
// Original attribute from ArcGIS API is FIELDSPECIES
|
||||
Fieldspecies null.Val[string] `db:"fieldspecies" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -313,7 +313,7 @@ func (fieldseekerMosquitoinspectionColumns) AliasedAs(alias string) fieldseekerM
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerMosquitoinspectionSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Numdips omitnull.Val[int16] `db:"numdips" `
|
||||
Activity omitnull.Val[string] `db:"activity" `
|
||||
Breeding omitnull.Val[string] `db:"breeding" `
|
||||
|
|
@ -346,7 +346,7 @@ type FieldseekerMosquitoinspectionSetter struct {
|
|||
Cbcount omitnull.Val[int16] `db:"cbcount" `
|
||||
Containercount omitnull.Val[int16] `db:"containercount" `
|
||||
Fieldspecies omitnull.Val[string] `db:"fieldspecies" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -1566,25 +1566,25 @@ func (s FieldseekerMosquitoinspectionSetter) Expressions(prefix ...string) []bob
|
|||
|
||||
// FindFieldseekerMosquitoinspection retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerMosquitoinspection(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerMosquitoinspection, error) {
|
||||
func FindFieldseekerMosquitoinspection(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerMosquitoinspection, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerMosquitoinspections.Query(
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerMosquitoinspections.Query(
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerMosquitoinspections.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerMosquitoinspectionExists checks the presence of a single record by primary key
|
||||
func FieldseekerMosquitoinspectionExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerMosquitoinspectionExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerMosquitoinspections.Query(
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1610,13 +1610,13 @@ func (o *FieldseekerMosquitoinspection) AfterQueryHook(ctx context.Context, exec
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerMosquitoinspection
|
||||
func (o *FieldseekerMosquitoinspection) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerMosquitoinspection) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.mosquitoinspection", "objectid"), psql.Quote("fieldseeker.mosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.mosquitoinspection", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1643,7 +1643,7 @@ func (o *FieldseekerMosquitoinspection) Delete(ctx context.Context, exec bob.Exe
|
|||
// Reload refreshes the FieldseekerMosquitoinspection using the executor
|
||||
func (o *FieldseekerMosquitoinspection) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerMosquitoinspections.Query(
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerMosquitoinspections.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1678,7 +1678,7 @@ func (o FieldseekerMosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.mosquitoinspection", "objectid"), psql.Quote("fieldseeker.mosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.mosquitoinspection", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1693,7 +1693,7 @@ func (o FieldseekerMosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerMosquitoinspectionSlice) copyMatchingRows(from ...*FieldseekerMosquitoinspection) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerPointlocation is an object representing the database table.
|
||||
type FieldseekerPointlocation struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is NAME
|
||||
Name null.Val[string] `db:"name" `
|
||||
// Original attribute from ArcGIS API is ZONE
|
||||
|
|
@ -61,7 +61,7 @@ type FieldseekerPointlocation struct {
|
|||
// Original attribute from ArcGIS API is LOCATIONNUMBER
|
||||
Locationnumber null.Val[int32] `db:"locationnumber" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is STYPE
|
||||
Stype null.Val[string] `db:"stype" `
|
||||
// Original attribute from ArcGIS API is LASTINSPECTDATE
|
||||
|
|
@ -264,7 +264,7 @@ func (fieldseekerPointlocationColumns) AliasedAs(alias string) fieldseekerPointl
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerPointlocationSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Habitat omitnull.Val[string] `db:"habitat" `
|
||||
|
|
@ -280,7 +280,7 @@ type FieldseekerPointlocationSetter struct {
|
|||
Larvinspectinterval omitnull.Val[int16] `db:"larvinspectinterval" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Locationnumber omitnull.Val[int32] `db:"locationnumber" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
Stype omitnull.Val[string] `db:"stype" `
|
||||
Lastinspectdate omitnull.Val[time.Time] `db:"lastinspectdate" `
|
||||
Lastinspectbreeding omitnull.Val[string] `db:"lastinspectbreeding" `
|
||||
|
|
@ -1257,25 +1257,25 @@ func (s FieldseekerPointlocationSetter) Expressions(prefix ...string) []bob.Expr
|
|||
|
||||
// FindFieldseekerPointlocation retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerPointlocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerPointlocation, error) {
|
||||
func FindFieldseekerPointlocation(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerPointlocation, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerPointlocations.Query(
|
||||
sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerPointlocations.Query(
|
||||
sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerPointlocations.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerPointlocationExists checks the presence of a single record by primary key
|
||||
func FieldseekerPointlocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerPointlocationExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerPointlocations.Query(
|
||||
sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1301,13 +1301,13 @@ func (o *FieldseekerPointlocation) AfterQueryHook(ctx context.Context, exec bob.
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerPointlocation
|
||||
func (o *FieldseekerPointlocation) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerPointlocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.pointlocation", "objectid"), psql.Quote("fieldseeker.pointlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.pointlocation", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1334,7 +1334,7 @@ func (o *FieldseekerPointlocation) Delete(ctx context.Context, exec bob.Executor
|
|||
// Reload refreshes the FieldseekerPointlocation using the executor
|
||||
func (o *FieldseekerPointlocation) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerPointlocations.Query(
|
||||
sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerPointlocations.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1369,7 +1369,7 @@ func (o FieldseekerPointlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.pointlocation", "objectid"), psql.Quote("fieldseeker.pointlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.pointlocation", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1384,7 +1384,7 @@ func (o FieldseekerPointlocationSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerPointlocationSlice) copyMatchingRows(from ...*FieldseekerPointlocation) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerPolygonlocation is an object representing the database table.
|
||||
type FieldseekerPolygonlocation struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is NAME
|
||||
Name null.Val[string] `db:"name" `
|
||||
// Original attribute from ArcGIS API is ZONE
|
||||
|
|
@ -63,7 +63,7 @@ type FieldseekerPolygonlocation struct {
|
|||
// Original attribute from ArcGIS API is LOCATIONNUMBER
|
||||
Locationnumber null.Val[int32] `db:"locationnumber" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is LASTINSPECTDATE
|
||||
Lastinspectdate null.Val[time.Time] `db:"lastinspectdate" `
|
||||
// Original attribute from ArcGIS API is LASTINSPECTBREEDING
|
||||
|
|
@ -253,7 +253,7 @@ func (fieldseekerPolygonlocationColumns) AliasedAs(alias string) fieldseekerPoly
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerPolygonlocationSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Habitat omitnull.Val[string] `db:"habitat" `
|
||||
|
|
@ -270,7 +270,7 @@ type FieldseekerPolygonlocationSetter struct {
|
|||
Larvinspectinterval omitnull.Val[int16] `db:"larvinspectinterval" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Locationnumber omitnull.Val[int32] `db:"locationnumber" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
Lastinspectdate omitnull.Val[time.Time] `db:"lastinspectdate" `
|
||||
Lastinspectbreeding omitnull.Val[string] `db:"lastinspectbreeding" `
|
||||
Lastinspectavglarvae omitnull.Val[float64] `db:"lastinspectavglarvae" `
|
||||
|
|
@ -1206,25 +1206,25 @@ func (s FieldseekerPolygonlocationSetter) Expressions(prefix ...string) []bob.Ex
|
|||
|
||||
// FindFieldseekerPolygonlocation retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerPolygonlocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerPolygonlocation, error) {
|
||||
func FindFieldseekerPolygonlocation(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerPolygonlocation, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerPolygonlocations.Query(
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerPolygonlocations.Query(
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerPolygonlocations.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerPolygonlocationExists checks the presence of a single record by primary key
|
||||
func FieldseekerPolygonlocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerPolygonlocationExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerPolygonlocations.Query(
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1250,13 +1250,13 @@ func (o *FieldseekerPolygonlocation) AfterQueryHook(ctx context.Context, exec bo
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerPolygonlocation
|
||||
func (o *FieldseekerPolygonlocation) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerPolygonlocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.polygonlocation", "objectid"), psql.Quote("fieldseeker.polygonlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.polygonlocation", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1283,7 +1283,7 @@ func (o *FieldseekerPolygonlocation) Delete(ctx context.Context, exec bob.Execut
|
|||
// Reload refreshes the FieldseekerPolygonlocation using the executor
|
||||
func (o *FieldseekerPolygonlocation) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerPolygonlocations.Query(
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerPolygonlocations.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1318,7 +1318,7 @@ func (o FieldseekerPolygonlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.polygonlocation", "objectid"), psql.Quote("fieldseeker.polygonlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.polygonlocation", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1333,7 +1333,7 @@ func (o FieldseekerPolygonlocationSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerPolygonlocationSlice) copyMatchingRows(from ...*FieldseekerPolygonlocation) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerPool is an object representing the database table.
|
||||
type FieldseekerPool struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is TRAPDATA_ID
|
||||
TrapdataID null.Val[uuid.UUID] `db:"trapdata_id" `
|
||||
// Original attribute from ArcGIS API is DATESENT
|
||||
|
|
@ -55,7 +55,7 @@ type FieldseekerPool struct {
|
|||
// Original attribute from ArcGIS API is DISEASEPOS
|
||||
Diseasepos null.Val[string] `db:"diseasepos" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -197,7 +197,7 @@ func (fieldseekerPoolColumns) AliasedAs(alias string) fieldseekerPoolColumns {
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerPoolSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
TrapdataID omitnull.Val[uuid.UUID] `db:"trapdata_id" `
|
||||
Datesent omitnull.Val[time.Time] `db:"datesent" `
|
||||
Survtech omitnull.Val[string] `db:"survtech" `
|
||||
|
|
@ -210,7 +210,7 @@ type FieldseekerPoolSetter struct {
|
|||
Testmethod omitnull.Val[string] `db:"testmethod" `
|
||||
Diseasetested omitnull.Val[string] `db:"diseasetested" `
|
||||
Diseasepos omitnull.Val[string] `db:"diseasepos" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -870,25 +870,25 @@ func (s FieldseekerPoolSetter) Expressions(prefix ...string) []bob.Expression {
|
|||
|
||||
// FindFieldseekerPool retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerPool(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerPool, error) {
|
||||
func FindFieldseekerPool(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerPool, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerPools.Query(
|
||||
sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPools.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPools.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerPools.Query(
|
||||
sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPools.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPools.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerPools.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerPoolExists checks the presence of a single record by primary key
|
||||
func FieldseekerPoolExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerPoolExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerPools.Query(
|
||||
sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPools.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPools.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -914,13 +914,13 @@ func (o *FieldseekerPool) AfterQueryHook(ctx context.Context, exec bob.Executor,
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerPool
|
||||
func (o *FieldseekerPool) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerPool) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.pool", "objectid"), psql.Quote("fieldseeker.pool", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.pool", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -947,7 +947,7 @@ func (o *FieldseekerPool) Delete(ctx context.Context, exec bob.Executor) error {
|
|||
// Reload refreshes the FieldseekerPool using the executor
|
||||
func (o *FieldseekerPool) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerPools.Query(
|
||||
sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerPools.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerPools.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -982,7 +982,7 @@ func (o FieldseekerPoolSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.pool", "objectid"), psql.Quote("fieldseeker.pool", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.pool", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -997,7 +997,7 @@ func (o FieldseekerPoolSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerPoolSlice) copyMatchingRows(from ...*FieldseekerPool) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerPooldetail is an object representing the database table.
|
||||
type FieldseekerPooldetail struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is TRAPDATA_ID
|
||||
TrapdataID null.Val[uuid.UUID] `db:"trapdata_id" `
|
||||
// Original attribute from ArcGIS API is POOL_ID
|
||||
|
|
@ -39,7 +39,7 @@ type FieldseekerPooldetail struct {
|
|||
// Original attribute from ArcGIS API is FEMALES
|
||||
Females null.Val[int16] `db:"females" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -141,12 +141,12 @@ func (fieldseekerPooldetailColumns) AliasedAs(alias string) fieldseekerPooldetai
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
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 omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -534,25 +534,25 @@ func (s FieldseekerPooldetailSetter) Expressions(prefix ...string) []bob.Express
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerPooldetail, error) {
|
||||
func FindFieldseekerPooldetail(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerPooldetail, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerPooldetailExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerPooldetails.Query(
|
||||
sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -578,13 +578,13 @@ func (o *FieldseekerPooldetail) AfterQueryHook(ctx context.Context, exec bob.Exe
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerPooldetail
|
||||
func (o *FieldseekerPooldetail) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerPooldetail) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.pooldetail", "objectid"), psql.Quote("fieldseeker.pooldetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.pooldetail", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -611,7 +611,7 @@ func (o *FieldseekerPooldetail) Delete(ctx context.Context, exec bob.Executor) e
|
|||
// 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))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerPooldetails.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -646,7 +646,7 @@ func (o FieldseekerPooldetailSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.pooldetail", "objectid"), psql.Quote("fieldseeker.pooldetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.pooldetail", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -661,7 +661,7 @@ func (o FieldseekerPooldetailSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerPooldetailSlice) copyMatchingRows(from ...*FieldseekerPooldetail) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerProposedtreatmentarea is an object representing the database table.
|
||||
type FieldseekerProposedtreatmentarea struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is METHOD
|
||||
Method null.Val[string] `db:"method" `
|
||||
// Original attribute from ArcGIS API is COMMENTS
|
||||
|
|
@ -57,7 +57,7 @@ type FieldseekerProposedtreatmentarea struct {
|
|||
// Original attribute from ArcGIS API is ACRES
|
||||
Acres null.Val[float64] `db:"acres" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is EXPORTED
|
||||
Exported null.Val[int16] `db:"exported" `
|
||||
// Original attribute from ArcGIS API is TARGETPRODUCT
|
||||
|
|
@ -217,7 +217,7 @@ func (fieldseekerProposedtreatmentareaColumns) AliasedAs(alias string) fieldseek
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerProposedtreatmentareaSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Method omitnull.Val[string] `db:"method" `
|
||||
Comments omitnull.Val[string] `db:"comments" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
|
|
@ -231,7 +231,7 @@ type FieldseekerProposedtreatmentareaSetter struct {
|
|||
Issprayroute omitnull.Val[int16] `db:"issprayroute" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Acres omitnull.Val[float64] `db:"acres" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
Exported omitnull.Val[int16] `db:"exported" `
|
||||
Targetproduct omitnull.Val[string] `db:"targetproduct" `
|
||||
Targetapprate omitnull.Val[float64] `db:"targetapprate" `
|
||||
|
|
@ -990,25 +990,25 @@ func (s FieldseekerProposedtreatmentareaSetter) Expressions(prefix ...string) []
|
|||
|
||||
// FindFieldseekerProposedtreatmentarea retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerProposedtreatmentarea(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerProposedtreatmentarea, error) {
|
||||
func FindFieldseekerProposedtreatmentarea(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerProposedtreatmentarea, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerProposedtreatmentareas.Query(
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerProposedtreatmentareas.Query(
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerProposedtreatmentareas.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerProposedtreatmentareaExists checks the presence of a single record by primary key
|
||||
func FieldseekerProposedtreatmentareaExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerProposedtreatmentareaExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerProposedtreatmentareas.Query(
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1034,13 +1034,13 @@ func (o *FieldseekerProposedtreatmentarea) AfterQueryHook(ctx context.Context, e
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerProposedtreatmentarea
|
||||
func (o *FieldseekerProposedtreatmentarea) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerProposedtreatmentarea) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.proposedtreatmentarea", "objectid"), psql.Quote("fieldseeker.proposedtreatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.proposedtreatmentarea", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1067,7 +1067,7 @@ func (o *FieldseekerProposedtreatmentarea) Delete(ctx context.Context, exec bob.
|
|||
// Reload refreshes the FieldseekerProposedtreatmentarea using the executor
|
||||
func (o *FieldseekerProposedtreatmentarea) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerProposedtreatmentareas.Query(
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerProposedtreatmentareas.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1102,7 +1102,7 @@ func (o FieldseekerProposedtreatmentareaSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.proposedtreatmentarea", "objectid"), psql.Quote("fieldseeker.proposedtreatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.proposedtreatmentarea", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1117,7 +1117,7 @@ func (o FieldseekerProposedtreatmentareaSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerProposedtreatmentareaSlice) copyMatchingRows(from ...*FieldseekerProposedtreatmentarea) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerQamosquitoinspection is an object representing the database table.
|
||||
type FieldseekerQamosquitoinspection struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is POSDIPS
|
||||
Posdips null.Val[int16] `db:"posdips" `
|
||||
// Original attribute from ArcGIS API is ACTIONTAKEN
|
||||
|
|
@ -43,7 +43,7 @@ type FieldseekerQamosquitoinspection struct {
|
|||
// Original attribute from ArcGIS API is RAINGAUGE
|
||||
Raingauge null.Val[float64] `db:"raingauge" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is STARTDATETIME
|
||||
Startdatetime null.Val[time.Time] `db:"startdatetime" `
|
||||
// Original attribute from ArcGIS API is ENDDATETIME
|
||||
|
|
@ -333,14 +333,14 @@ func (fieldseekerQamosquitoinspectionColumns) AliasedAs(alias string) fieldseeke
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerQamosquitoinspectionSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Posdips omitnull.Val[int16] `db:"posdips" `
|
||||
Actiontaken omitnull.Val[string] `db:"actiontaken" `
|
||||
Comments omitnull.Val[string] `db:"comments" `
|
||||
Avetemp omitnull.Val[float64] `db:"avetemp" `
|
||||
Windspeed omitnull.Val[float64] `db:"windspeed" `
|
||||
Raingauge omitnull.Val[float64] `db:"raingauge" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
Startdatetime omitnull.Val[time.Time] `db:"startdatetime" `
|
||||
Enddatetime omitnull.Val[time.Time] `db:"enddatetime" `
|
||||
Winddir omitnull.Val[string] `db:"winddir" `
|
||||
|
|
@ -1686,25 +1686,25 @@ func (s FieldseekerQamosquitoinspectionSetter) Expressions(prefix ...string) []b
|
|||
|
||||
// FindFieldseekerQamosquitoinspection retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerQamosquitoinspection(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerQamosquitoinspection, error) {
|
||||
func FindFieldseekerQamosquitoinspection(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerQamosquitoinspection, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerQamosquitoinspections.Query(
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerQamosquitoinspections.Query(
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerQamosquitoinspections.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerQamosquitoinspectionExists checks the presence of a single record by primary key
|
||||
func FieldseekerQamosquitoinspectionExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerQamosquitoinspectionExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerQamosquitoinspections.Query(
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1730,13 +1730,13 @@ func (o *FieldseekerQamosquitoinspection) AfterQueryHook(ctx context.Context, ex
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerQamosquitoinspection
|
||||
func (o *FieldseekerQamosquitoinspection) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerQamosquitoinspection) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.qamosquitoinspection", "objectid"), psql.Quote("fieldseeker.qamosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.qamosquitoinspection", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1763,7 +1763,7 @@ func (o *FieldseekerQamosquitoinspection) Delete(ctx context.Context, exec bob.E
|
|||
// Reload refreshes the FieldseekerQamosquitoinspection using the executor
|
||||
func (o *FieldseekerQamosquitoinspection) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerQamosquitoinspections.Query(
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerQamosquitoinspections.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1798,7 +1798,7 @@ func (o FieldseekerQamosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.qamosquitoinspection", "objectid"), psql.Quote("fieldseeker.qamosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.qamosquitoinspection", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1813,7 +1813,7 @@ func (o FieldseekerQamosquitoinspectionSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerQamosquitoinspectionSlice) copyMatchingRows(from ...*FieldseekerQamosquitoinspection) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerRodentlocation is an object representing the database table.
|
||||
type FieldseekerRodentlocation struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is LOCATIONNAME
|
||||
Locationname null.Val[string] `db:"locationname" `
|
||||
// Original attribute from ArcGIS API is ZONE
|
||||
|
|
@ -69,7 +69,7 @@ type FieldseekerRodentlocation struct {
|
|||
// Original attribute from ArcGIS API is LASTINSPECTRODENTEVIDENCE
|
||||
Lastinspectrodentevidence null.Val[string] `db:"lastinspectrodentevidence" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -205,7 +205,7 @@ func (fieldseekerRodentlocationColumns) AliasedAs(alias string) fieldseekerRoden
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerRodentlocationSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Locationname omitnull.Val[string] `db:"locationname" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
|
|
@ -225,7 +225,7 @@ type FieldseekerRodentlocationSetter struct {
|
|||
Lastinspectaction omitnull.Val[string] `db:"lastinspectaction" `
|
||||
Lastinspectconditions omitnull.Val[string] `db:"lastinspectconditions" `
|
||||
Lastinspectrodentevidence omitnull.Val[string] `db:"lastinspectrodentevidence" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -918,25 +918,25 @@ func (s FieldseekerRodentlocationSetter) Expressions(prefix ...string) []bob.Exp
|
|||
|
||||
// FindFieldseekerRodentlocation retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerRodentlocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerRodentlocation, error) {
|
||||
func FindFieldseekerRodentlocation(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerRodentlocation, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerRodentlocations.Query(
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerRodentlocations.Query(
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerRodentlocations.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerRodentlocationExists checks the presence of a single record by primary key
|
||||
func FieldseekerRodentlocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerRodentlocationExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerRodentlocations.Query(
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -962,13 +962,13 @@ func (o *FieldseekerRodentlocation) AfterQueryHook(ctx context.Context, exec bob
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerRodentlocation
|
||||
func (o *FieldseekerRodentlocation) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerRodentlocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.rodentlocation", "objectid"), psql.Quote("fieldseeker.rodentlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.rodentlocation", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -995,7 +995,7 @@ func (o *FieldseekerRodentlocation) Delete(ctx context.Context, exec bob.Executo
|
|||
// Reload refreshes the FieldseekerRodentlocation using the executor
|
||||
func (o *FieldseekerRodentlocation) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerRodentlocations.Query(
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerRodentlocations.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1030,7 +1030,7 @@ func (o FieldseekerRodentlocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.rodentlocation", "objectid"), psql.Quote("fieldseeker.rodentlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.rodentlocation", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1045,7 +1045,7 @@ func (o FieldseekerRodentlocationSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerRodentlocationSlice) copyMatchingRows(from ...*FieldseekerRodentlocation) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerSamplecollection is an object representing the database table.
|
||||
type FieldseekerSamplecollection struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is LOC_ID
|
||||
LocID null.Val[uuid.UUID] `db:"loc_id" `
|
||||
// Original attribute from ArcGIS API is STARTDATETIME
|
||||
|
|
@ -91,7 +91,7 @@ type FieldseekerSamplecollection struct {
|
|||
// Original attribute from ArcGIS API is ZONE2
|
||||
Zone2 null.Val[string] `db:"zone2" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -269,7 +269,7 @@ func (fieldseekerSamplecollectionColumns) AliasedAs(alias string) fieldseekerSam
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type FieldseekerSamplecollectionSetter struct {
|
||||
Objectid omit.Val[int64] `db:"objectid,pk" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
LocID omitnull.Val[uuid.UUID] `db:"loc_id" `
|
||||
Startdatetime omitnull.Val[time.Time] `db:"startdatetime" `
|
||||
Enddatetime omitnull.Val[time.Time] `db:"enddatetime" `
|
||||
|
|
@ -300,7 +300,7 @@ type FieldseekerSamplecollectionSetter struct {
|
|||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Recordstatus omitnull.Val[int16] `db:"recordstatus" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -1302,25 +1302,25 @@ func (s FieldseekerSamplecollectionSetter) Expressions(prefix ...string) []bob.E
|
|||
|
||||
// FindFieldseekerSamplecollection retrieves a single record by primary key
|
||||
// If cols is empty Find will return all columns.
|
||||
func FindFieldseekerSamplecollection(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32, cols ...string) (*FieldseekerSamplecollection, error) {
|
||||
func FindFieldseekerSamplecollection(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerSamplecollection, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerSamplecollections.Query(
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerSamplecollections.Query(
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
sm.Columns(FieldseekerSamplecollections.Columns.Only(cols...)),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
// FieldseekerSamplecollectionExists checks the presence of a single record by primary key
|
||||
func FieldseekerSamplecollectionExists(ctx context.Context, exec bob.Executor, ObjectidPK int64, VersionPK int32) (bool, error) {
|
||||
func FieldseekerSamplecollectionExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerSamplecollections.Query(
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -1346,13 +1346,13 @@ func (o *FieldseekerSamplecollection) AfterQueryHook(ctx context.Context, exec b
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerSamplecollection
|
||||
func (o *FieldseekerSamplecollection) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerSamplecollection) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.samplecollection", "objectid"), psql.Quote("fieldseeker.samplecollection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.samplecollection", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -1379,7 +1379,7 @@ func (o *FieldseekerSamplecollection) Delete(ctx context.Context, exec bob.Execu
|
|||
// Reload refreshes the FieldseekerSamplecollection using the executor
|
||||
func (o *FieldseekerSamplecollection) Reload(ctx context.Context, exec bob.Executor) error {
|
||||
o2, err := FieldseekerSamplecollections.Query(
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(o.Objectid))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerSamplecollections.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -1414,7 +1414,7 @@ func (o FieldseekerSamplecollectionSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.samplecollection", "objectid"), psql.Quote("fieldseeker.samplecollection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.samplecollection", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -1429,7 +1429,7 @@ func (o FieldseekerSamplecollectionSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerSamplecollectionSlice) copyMatchingRows(from ...*FieldseekerSamplecollection) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import (
|
|||
|
||||
// FieldseekerSamplelocation is an object representing the database table.
|
||||
type FieldseekerSamplelocation struct {
|
||||
Objectid int64 `db:"objectid,pk" `
|
||||
Objectid int64 `db:"objectid" `
|
||||
// Original attribute from ArcGIS API is NAME
|
||||
Name null.Val[string] `db:"name" `
|
||||
// Original attribute from ArcGIS API is ZONE
|
||||
|
|
@ -57,7 +57,7 @@ type FieldseekerSamplelocation struct {
|
|||
// Original attribute from ArcGIS API is LOCATIONNUMBER
|
||||
Locationnumber null.Val[int32] `db:"locationnumber" `
|
||||
// Original attribute from ArcGIS API is GlobalID
|
||||
Globalid uuid.UUID `db:"globalid" `
|
||||
Globalid uuid.UUID `db:"globalid,pk" `
|
||||
// Original attribute from ArcGIS API is created_user
|
||||
CreatedUser null.Val[string] `db:"created_user" `
|
||||
// Original attribute from ArcGIS API is created_date
|
||||
|
|
@ -181,7 +181,7 @@ func (fieldseekerSamplelocationColumns) AliasedAs(alias string) fieldseekerSampl
|
|||
// 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" `
|
||||
Objectid omit.Val[int64] `db:"objectid" `
|
||||
Name omitnull.Val[string] `db:"name" `
|
||||
Zone omitnull.Val[string] `db:"zone" `
|
||||
Habitat omitnull.Val[string] `db:"habitat" `
|
||||
|
|
@ -195,7 +195,7 @@ type FieldseekerSamplelocationSetter struct {
|
|||
Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" `
|
||||
Zone2 omitnull.Val[string] `db:"zone2" `
|
||||
Locationnumber omitnull.Val[int32] `db:"locationnumber" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid" `
|
||||
Globalid omit.Val[uuid.UUID] `db:"globalid,pk" `
|
||||
CreatedUser omitnull.Val[string] `db:"created_user" `
|
||||
CreatedDate omitnull.Val[time.Time] `db:"created_date" `
|
||||
LastEditedUser omitnull.Val[string] `db:"last_edited_user" `
|
||||
|
|
@ -774,25 +774,25 @@ func (s FieldseekerSamplelocationSetter) Expressions(prefix ...string) []bob.Exp
|
|||
|
||||
// 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, VersionPK int32, cols ...string) (*FieldseekerSamplelocation, error) {
|
||||
func FindFieldseekerSamplelocation(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32, cols ...string) (*FieldseekerSamplelocation, error) {
|
||||
if len(cols) == 0 {
|
||||
return FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).One(ctx, exec)
|
||||
}
|
||||
|
||||
return FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
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, VersionPK int32) (bool, error) {
|
||||
func FieldseekerSamplelocationExists(ctx context.Context, exec bob.Executor, GlobalidPK uuid.UUID, VersionPK int32) (bool, error) {
|
||||
return FieldseekerSamplelocations.Query(
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Globalid.EQ(psql.Arg(GlobalidPK))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Version.EQ(psql.Arg(VersionPK))),
|
||||
).Exists(ctx, exec)
|
||||
}
|
||||
|
|
@ -818,13 +818,13 @@ func (o *FieldseekerSamplelocation) AfterQueryHook(ctx context.Context, exec bob
|
|||
// primaryKeyVals returns the primary key values of the FieldseekerSamplelocation
|
||||
func (o *FieldseekerSamplelocation) primaryKeyVals() bob.Expression {
|
||||
return psql.ArgGroup(
|
||||
o.Objectid,
|
||||
o.Globalid,
|
||||
o.Version,
|
||||
)
|
||||
}
|
||||
|
||||
func (o *FieldseekerSamplelocation) pkEQ() dialect.Expression {
|
||||
return psql.Group(psql.Quote("fieldseeker.samplelocation", "objectid"), psql.Quote("fieldseeker.samplelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.samplelocation", "globalid"), psql.Quote("fieldseeker.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)
|
||||
}))
|
||||
}
|
||||
|
|
@ -851,7 +851,7 @@ func (o *FieldseekerSamplelocation) Delete(ctx context.Context, exec bob.Executo
|
|||
// 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))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Globalid.EQ(psql.Arg(o.Globalid))),
|
||||
sm.Where(FieldseekerSamplelocations.Columns.Version.EQ(psql.Arg(o.Version))),
|
||||
).One(ctx, exec)
|
||||
if err != nil {
|
||||
|
|
@ -886,7 +886,7 @@ func (o FieldseekerSamplelocationSlice) pkIN() dialect.Expression {
|
|||
return psql.Raw("NULL")
|
||||
}
|
||||
|
||||
return psql.Group(psql.Quote("fieldseeker.samplelocation", "objectid"), psql.Quote("fieldseeker.samplelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
return psql.Group(psql.Quote("fieldseeker.samplelocation", "globalid"), psql.Quote("fieldseeker.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()
|
||||
|
|
@ -901,7 +901,7 @@ func (o FieldseekerSamplelocationSlice) pkIN() dialect.Expression {
|
|||
func (o FieldseekerSamplelocationSlice) copyMatchingRows(from ...*FieldseekerSamplelocation) {
|
||||
for i, old := range o {
|
||||
for _, new := range from {
|
||||
if new.Objectid != old.Objectid {
|
||||
if new.Globalid != old.Globalid {
|
||||
continue
|
||||
}
|
||||
if new.Version != old.Version {
|
||||
|
|
|
|||
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