nidus-sync/db/dbinfo/fieldseeker.pointlocation.bob.go
Eli Ribble b542b8268e Add precalc h3 cells to fieldseeker tables
This makes it so we don't have to try to parse the geometry JSON and
instead can just pass pre-calculated h3 values, which take fewer bytes,
everywhere.
2026-01-05 23:25:16 +00:00

592 lines
16 KiB
Go

// Code generated by BobGen psql v0.0.4-0.20260105020634-53e08d840e47+dirty. 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 FieldseekerPointlocations = Table[
fieldseekerPointlocationColumns,
fieldseekerPointlocationIndexes,
fieldseekerPointlocationForeignKeys,
fieldseekerPointlocationUniques,
fieldseekerPointlocationChecks,
]{
Schema: "fieldseeker",
Name: "pointlocation",
Columns: fieldseekerPointlocationColumns{
Objectid: column{
Name: "objectid",
DBType: "bigint",
Default: "nextval('fieldseeker.pointlocation_objectid_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Name: column{
Name: "name",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is NAME",
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,
},
Habitat: column{
Name: "habitat",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is HABITAT",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Priority: column{
Name: "priority",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is PRIORITY",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Usetype: column{
Name: "usetype",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is USETYPE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Active: column{
Name: "active",
DBType: "smallint",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is ACTIVE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Description: column{
Name: "description",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is DESCRIPTION",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Accessdesc: column{
Name: "accessdesc",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is ACCESSDESC",
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,
},
Symbology: column{
Name: "symbology",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is SYMBOLOGY",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Externalid: column{
Name: "externalid",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is EXTERNALID",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Nextactiondatescheduled: column{
Name: "nextactiondatescheduled",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is NEXTACTIONDATESCHEDULED",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Larvinspectinterval: column{
Name: "larvinspectinterval",
DBType: "smallint",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LARVINSPECTINTERVAL",
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,
},
Locationnumber: column{
Name: "locationnumber",
DBType: "integer",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LOCATIONNUMBER",
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,
},
Stype: column{
Name: "stype",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is STYPE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectdate: column{
Name: "lastinspectdate",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTDATE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectbreeding: column{
Name: "lastinspectbreeding",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTBREEDING",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectavglarvae: column{
Name: "lastinspectavglarvae",
DBType: "double precision",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTAVGLARVAE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectavgpupae: column{
Name: "lastinspectavgpupae",
DBType: "double precision",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTAVGPUPAE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectlstages: column{
Name: "lastinspectlstages",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTLSTAGES",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectactiontaken: column{
Name: "lastinspectactiontaken",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTACTIONTAKEN",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectfieldspecies: column{
Name: "lastinspectfieldspecies",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTFIELDSPECIES",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lasttreatdate: column{
Name: "lasttreatdate",
DBType: "timestamp without time zone",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTTREATDATE",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lasttreatproduct: column{
Name: "lasttreatproduct",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTTREATPRODUCT",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lasttreatqty: column{
Name: "lasttreatqty",
DBType: "double precision",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTTREATQTY",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lasttreatqtyunit: column{
Name: "lasttreatqtyunit",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTTREATQTYUNIT",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectactivity: column{
Name: "lastinspectactivity",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTACTIVITY",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lasttreatactivity: column{
Name: "lasttreatactivity",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTTREATACTIVITY",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Lastinspectconditions: column{
Name: "lastinspectconditions",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is LASTINSPECTCONDITIONS",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Waterorigin: column{
Name: "waterorigin",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is WATERORIGIN",
Nullable: true,
Generated: false,
AutoIncr: false,
},
X: column{
Name: "x",
DBType: "double precision",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is X",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Y: column{
Name: "y",
DBType: "double precision",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is Y",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Assignedtech: column{
Name: "assignedtech",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is ASSIGNEDTECH",
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,
},
Jurisdiction: column{
Name: "jurisdiction",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is JURISDICTION",
Nullable: true,
Generated: false,
AutoIncr: false,
},
DeactivateReason: column{
Name: "deactivate_reason",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is deactivate_reason",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Scalarpriority: column{
Name: "scalarpriority",
DBType: "integer",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is scalarPriority",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Sourcestatus: column{
Name: "sourcestatus",
DBType: "character varying",
Default: "NULL",
Comment: "Original attribute from ArcGIS API is sourceStatus",
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: fieldseekerPointlocationIndexes{
PointlocationPkey: index{
Type: "btree",
Name: "pointlocation_pkey",
Columns: []indexColumn{
{
Name: "objectid",
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: "pointlocation_pkey",
Columns: []string{"objectid", "version"},
Comment: "",
},
ForeignKeys: fieldseekerPointlocationForeignKeys{
FieldseekerPointlocationPointlocationOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "fieldseeker.pointlocation.pointlocation_organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
},
Comment: "",
}
type fieldseekerPointlocationColumns struct {
Objectid column
Name column
Zone column
Habitat column
Priority column
Usetype column
Active column
Description column
Accessdesc column
Comments column
Symbology column
Externalid column
Nextactiondatescheduled column
Larvinspectinterval column
Zone2 column
Locationnumber column
Globalid column
Stype column
Lastinspectdate column
Lastinspectbreeding column
Lastinspectavglarvae column
Lastinspectavgpupae column
Lastinspectlstages column
Lastinspectactiontaken column
Lastinspectfieldspecies column
Lasttreatdate column
Lasttreatproduct column
Lasttreatqty column
Lasttreatqtyunit column
Lastinspectactivity column
Lasttreatactivity column
Lastinspectconditions column
Waterorigin column
X column
Y column
Assignedtech column
Creationdate column
Creator column
Editdate column
Editor column
Jurisdiction column
DeactivateReason column
Scalarpriority column
Sourcestatus column
Geometry column
Geospatial column
Version column
OrganizationID column
H3cell column
}
func (c fieldseekerPointlocationColumns) AsSlice() []column {
return []column{
c.Objectid, c.Name, c.Zone, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Nextactiondatescheduled, c.Larvinspectinterval, c.Zone2, c.Locationnumber, c.Globalid, c.Stype, c.Lastinspectdate, c.Lastinspectbreeding, c.Lastinspectavglarvae, c.Lastinspectavgpupae, c.Lastinspectlstages, c.Lastinspectactiontaken, c.Lastinspectfieldspecies, c.Lasttreatdate, c.Lasttreatproduct, c.Lasttreatqty, c.Lasttreatqtyunit, c.Lastinspectactivity, c.Lasttreatactivity, c.Lastinspectconditions, c.Waterorigin, c.X, c.Y, c.Assignedtech, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.DeactivateReason, c.Scalarpriority, c.Sourcestatus, c.Geometry, c.Geospatial, c.Version, c.OrganizationID, c.H3cell,
}
}
type fieldseekerPointlocationIndexes struct {
PointlocationPkey index
}
func (i fieldseekerPointlocationIndexes) AsSlice() []index {
return []index{
i.PointlocationPkey,
}
}
type fieldseekerPointlocationForeignKeys struct {
FieldseekerPointlocationPointlocationOrganizationIDFkey foreignKey
}
func (f fieldseekerPointlocationForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.FieldseekerPointlocationPointlocationOrganizationIDFkey,
}
}
type fieldseekerPointlocationUniques struct{}
func (u fieldseekerPointlocationUniques) AsSlice() []constraint {
return []constraint{}
}
type fieldseekerPointlocationChecks struct{}
func (c fieldseekerPointlocationChecks) AsSlice() []check {
return []check{}
}