This is extremely useful for testing. In order to do this I needed to actually deploy the migration to a bob fork so I could start to add support for behaviors I really want. Specifically the ability to search for ids in a slice.
692 lines
18 KiB
Go
692 lines
18 KiB
Go
// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package dbinfo
|
|
|
|
import "github.com/aarondl/opt/null"
|
|
|
|
var FieldseekerTreatments = Table[
|
|
fieldseekerTreatmentColumns,
|
|
fieldseekerTreatmentIndexes,
|
|
fieldseekerTreatmentForeignKeys,
|
|
fieldseekerTreatmentUniques,
|
|
fieldseekerTreatmentChecks,
|
|
]{
|
|
Schema: "fieldseeker",
|
|
Name: "treatment",
|
|
Columns: fieldseekerTreatmentColumns{
|
|
Objectid: column{
|
|
Name: "objectid",
|
|
DBType: "bigint",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Activity: column{
|
|
Name: "activity",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is ACTIVITY",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treatarea: column{
|
|
Name: "treatarea",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATAREA",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Areaunit: column{
|
|
Name: "areaunit",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is AREAUNIT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Product: column{
|
|
Name: "product",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is PRODUCT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Qty: column{
|
|
Name: "qty",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is QTY",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Qtyunit: column{
|
|
Name: "qtyunit",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is QTYUNIT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Method: column{
|
|
Name: "method",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is METHOD",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Equiptype: column{
|
|
Name: "equiptype",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is EQUIPTYPE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Comments: column{
|
|
Name: "comments",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is COMMENTS",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Avetemp: column{
|
|
Name: "avetemp",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is AVETEMP",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Windspeed: column{
|
|
Name: "windspeed",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is WINDSPEED",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Winddir: column{
|
|
Name: "winddir",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is WINDDIR",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Raingauge: column{
|
|
Name: "raingauge",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is RAINGAUGE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Startdatetime: column{
|
|
Name: "startdatetime",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is STARTDATETIME",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Enddatetime: column{
|
|
Name: "enddatetime",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is ENDDATETIME",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
InspID: column{
|
|
Name: "insp_id",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is INSP_ID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Reviewed: column{
|
|
Name: "reviewed",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is REVIEWED",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Reviewedby: column{
|
|
Name: "reviewedby",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is REVIEWEDBY",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Revieweddate: column{
|
|
Name: "revieweddate",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is REVIEWEDDATE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Locationname: column{
|
|
Name: "locationname",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is LOCATIONNAME",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Zone: column{
|
|
Name: "zone",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is ZONE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Warningoverride: column{
|
|
Name: "warningoverride",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is WARNINGOVERRIDE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Recordstatus: column{
|
|
Name: "recordstatus",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is RECORDSTATUS",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Zone2: column{
|
|
Name: "zone2",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is ZONE2",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treatacres: column{
|
|
Name: "treatacres",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATACRES",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Tirecount: column{
|
|
Name: "tirecount",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TIRECOUNT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Cbcount: column{
|
|
Name: "cbcount",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is CBCOUNT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Containercount: column{
|
|
Name: "containercount",
|
|
DBType: "smallint",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is CONTAINERCOUNT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Globalid: column{
|
|
Name: "globalid",
|
|
DBType: "uuid",
|
|
Default: "",
|
|
Comment: "Original attribute from ArcGIS API is GlobalID",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treatmentlength: column{
|
|
Name: "treatmentlength",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATMENTLENGTH",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treatmenthours: column{
|
|
Name: "treatmenthours",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATMENTHOURS",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treatmentlengthunits: column{
|
|
Name: "treatmentlengthunits",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATMENTLENGTHUNITS",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Linelocid: column{
|
|
Name: "linelocid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is LINELOCID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Pointlocid: column{
|
|
Name: "pointlocid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is POINTLOCID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Polygonlocid: column{
|
|
Name: "polygonlocid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is POLYGONLOCID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Srid: column{
|
|
Name: "srid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is SRID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Sdid: column{
|
|
Name: "sdid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is SDID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Barrierrouteid: column{
|
|
Name: "barrierrouteid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is BARRIERROUTEID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Ulvrouteid: column{
|
|
Name: "ulvrouteid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is ULVROUTEID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Fieldtech: column{
|
|
Name: "fieldtech",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is FIELDTECH",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Ptaid: column{
|
|
Name: "ptaid",
|
|
DBType: "uuid",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is PTAID",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Flowrate: column{
|
|
Name: "flowrate",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is FLOWRATE",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Habitat: column{
|
|
Name: "habitat",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is HABITAT",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Treathectares: column{
|
|
Name: "treathectares",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TREATHECTARES",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Invloc: column{
|
|
Name: "invloc",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is INVLOC",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
TempSitecond: column{
|
|
Name: "temp_sitecond",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is temp_SITECOND",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Sitecond: column{
|
|
Name: "sitecond",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is SITECOND",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Totalcostprodcut: column{
|
|
Name: "totalcostprodcut",
|
|
DBType: "double precision",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TotalCostProdcut",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Creationdate: column{
|
|
Name: "creationdate",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is CreationDate",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Creator: column{
|
|
Name: "creator",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is Creator",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Editdate: column{
|
|
Name: "editdate",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is EditDate",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Editor: column{
|
|
Name: "editor",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is Editor",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Targetspecies: column{
|
|
Name: "targetspecies",
|
|
DBType: "character varying",
|
|
Default: "NULL",
|
|
Comment: "Original attribute from ArcGIS API is TARGETSPECIES",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Geometry: column{
|
|
Name: "geometry",
|
|
DBType: "jsonb",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Geospatial: column{
|
|
Name: "geospatial",
|
|
DBType: "geometry",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Version: column{
|
|
Name: "version",
|
|
DBType: "integer",
|
|
Default: "1",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
OrganizationID: column{
|
|
Name: "organization_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
H3cell: column{
|
|
Name: "h3cell",
|
|
DBType: "h3index",
|
|
Default: "GENERATED",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: true,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: fieldseekerTreatmentIndexes{
|
|
TreatmentPkey: index{
|
|
Type: "btree",
|
|
Name: "treatment_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "globalid",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "version",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false, false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "treatment_pkey",
|
|
Columns: []string{"globalid", "version"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: fieldseekerTreatmentForeignKeys{
|
|
FieldseekerTreatmentTreatmentOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "fieldseeker.treatment.treatment_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type fieldseekerTreatmentColumns struct {
|
|
Objectid column
|
|
Activity column
|
|
Treatarea column
|
|
Areaunit column
|
|
Product column
|
|
Qty column
|
|
Qtyunit column
|
|
Method column
|
|
Equiptype column
|
|
Comments column
|
|
Avetemp column
|
|
Windspeed column
|
|
Winddir column
|
|
Raingauge column
|
|
Startdatetime column
|
|
Enddatetime column
|
|
InspID column
|
|
Reviewed column
|
|
Reviewedby column
|
|
Revieweddate column
|
|
Locationname column
|
|
Zone column
|
|
Warningoverride column
|
|
Recordstatus column
|
|
Zone2 column
|
|
Treatacres column
|
|
Tirecount column
|
|
Cbcount column
|
|
Containercount column
|
|
Globalid column
|
|
Treatmentlength column
|
|
Treatmenthours column
|
|
Treatmentlengthunits column
|
|
Linelocid column
|
|
Pointlocid column
|
|
Polygonlocid column
|
|
Srid column
|
|
Sdid column
|
|
Barrierrouteid column
|
|
Ulvrouteid column
|
|
Fieldtech column
|
|
Ptaid column
|
|
Flowrate column
|
|
Habitat column
|
|
Treathectares column
|
|
Invloc column
|
|
TempSitecond column
|
|
Sitecond column
|
|
Totalcostprodcut column
|
|
Creationdate column
|
|
Creator column
|
|
Editdate column
|
|
Editor column
|
|
Targetspecies column
|
|
Geometry column
|
|
Geospatial column
|
|
Version column
|
|
OrganizationID column
|
|
H3cell column
|
|
}
|
|
|
|
func (c fieldseekerTreatmentColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Objectid, c.Activity, c.Treatarea, c.Areaunit, c.Product, c.Qty, c.Qtyunit, c.Method, c.Equiptype, c.Comments, c.Avetemp, c.Windspeed, c.Winddir, c.Raingauge, c.Startdatetime, c.Enddatetime, c.InspID, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Locationname, c.Zone, c.Warningoverride, c.Recordstatus, c.Zone2, c.Treatacres, c.Tirecount, c.Cbcount, c.Containercount, c.Globalid, c.Treatmentlength, c.Treatmenthours, c.Treatmentlengthunits, c.Linelocid, c.Pointlocid, c.Polygonlocid, c.Srid, c.Sdid, c.Barrierrouteid, c.Ulvrouteid, c.Fieldtech, c.Ptaid, c.Flowrate, c.Habitat, c.Treathectares, c.Invloc, c.TempSitecond, c.Sitecond, c.Totalcostprodcut, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Targetspecies, c.Geometry, c.Geospatial, c.Version, c.OrganizationID, c.H3cell,
|
|
}
|
|
}
|
|
|
|
type fieldseekerTreatmentIndexes struct {
|
|
TreatmentPkey index
|
|
}
|
|
|
|
func (i fieldseekerTreatmentIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.TreatmentPkey,
|
|
}
|
|
}
|
|
|
|
type fieldseekerTreatmentForeignKeys struct {
|
|
FieldseekerTreatmentTreatmentOrganizationIDFkey foreignKey
|
|
}
|
|
|
|
func (f fieldseekerTreatmentForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.FieldseekerTreatmentTreatmentOrganizationIDFkey,
|
|
}
|
|
}
|
|
|
|
type fieldseekerTreatmentUniques struct{}
|
|
|
|
func (u fieldseekerTreatmentUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type fieldseekerTreatmentChecks struct{}
|
|
|
|
func (c fieldseekerTreatmentChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|