Go to h3 v4, Add initial h3 aggregation work

This calculates the summary information of data in h3 nodes and puts it
in the database for fast lookup.
This commit is contained in:
Eli Ribble 2025-11-13 23:48:41 +00:00
parent 7919f0da66
commit e48abb09c0
No known key found for this signature in database
120 changed files with 8516 additions and 1539 deletions

View file

@ -72,9 +72,9 @@ var FSContainerrelates = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -63,9 +63,9 @@ var FSFieldscoutinglogs = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -72,9 +72,9 @@ var FSHabitatrelates = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -63,9 +63,9 @@ var FSInspectionsamples = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -135,9 +135,9 @@ var FSInspectionsampledetails = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -117,9 +117,9 @@ var FSLinelocations = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -81,9 +81,9 @@ var FSLocationtrackings = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -198,9 +198,9 @@ var FSMosquitoinspections = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -108,9 +108,9 @@ var FSPointlocations = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},
@ -387,18 +387,18 @@ var FSPointlocations = Table[
GeometryX: column{
Name: "geometry_x",
DBType: "double precision",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},
GeometryY: column{
Name: "geometry_y",
DBType: "double precision",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -126,9 +126,9 @@ var FSPolygonlocations = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -117,9 +117,9 @@ var FSPools = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -72,9 +72,9 @@ var FSPooldetails = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -126,9 +126,9 @@ var FSProposedtreatmentareas = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -153,9 +153,9 @@ var FSQamosquitoinspections = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -108,9 +108,9 @@ var FSRodentlocations = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -171,9 +171,9 @@ var FSSamplecollections = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -117,9 +117,9 @@ var FSSamplelocations = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -297,9 +297,9 @@ var FSServicerequests = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},
@ -747,18 +747,18 @@ var FSServicerequests = Table[
GeometryX: column{
Name: "geometry_x",
DBType: "double precision",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},
GeometryY: column{
Name: "geometry_y",
DBType: "double precision",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -99,9 +99,9 @@ var FSSpeciesabundances = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -63,9 +63,9 @@ var FSStormdrains = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -117,9 +117,9 @@ var FSTimecards = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -117,9 +117,9 @@ var FSTrapdata = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -117,9 +117,9 @@ var FSTraplocations = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -162,9 +162,9 @@ var FSTreatments = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -72,9 +72,9 @@ var FSTreatmentareas = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -72,9 +72,9 @@ var FSZones = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -63,9 +63,9 @@ var FSZones2s = Table[
Globalid: column{
Name: "globalid",
DBType: "text",
Default: "NULL",
Default: "",
Comment: "",
Nullable: true,
Nullable: false,
Generated: false,
AutoIncr: false,
},

View file

@ -0,0 +1,122 @@
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
var GeographyColumns = Table[
geographyColumnColumns,
geographyColumnIndexes,
geographyColumnForeignKeys,
geographyColumnUniques,
geographyColumnChecks,
]{
Schema: "",
Name: "geography_columns",
Columns: geographyColumnColumns{
FTableCatalog: column{
Name: "f_table_catalog",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FTableSchema: column{
Name: "f_table_schema",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FTableName: column{
Name: "f_table_name",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FGeographyColumn: column{
Name: "f_geography_column",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
CoordDimension: column{
Name: "coord_dimension",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Srid: column{
Name: "srid",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Type: column{
Name: "type",
DBType: "text",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Comment: "",
}
type geographyColumnColumns struct {
FTableCatalog column
FTableSchema column
FTableName column
FGeographyColumn column
CoordDimension column
Srid column
Type column
}
func (c geographyColumnColumns) AsSlice() []column {
return []column{
c.FTableCatalog, c.FTableSchema, c.FTableName, c.FGeographyColumn, c.CoordDimension, c.Srid, c.Type,
}
}
type geographyColumnIndexes struct{}
func (i geographyColumnIndexes) AsSlice() []index {
return []index{}
}
type geographyColumnForeignKeys struct{}
func (f geographyColumnForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type geographyColumnUniques struct{}
func (u geographyColumnUniques) AsSlice() []constraint {
return []constraint{}
}
type geographyColumnChecks struct{}
func (c geographyColumnChecks) AsSlice() []check {
return []check{}
}

View file

@ -0,0 +1,122 @@
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
var GeometryColumns = Table[
geometryColumnColumns,
geometryColumnIndexes,
geometryColumnForeignKeys,
geometryColumnUniques,
geometryColumnChecks,
]{
Schema: "",
Name: "geometry_columns",
Columns: geometryColumnColumns{
FTableCatalog: column{
Name: "f_table_catalog",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FTableSchema: column{
Name: "f_table_schema",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FTableName: column{
Name: "f_table_name",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
FGeometryColumn: column{
Name: "f_geometry_column",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
CoordDimension: column{
Name: "coord_dimension",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Srid: column{
Name: "srid",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Type: column{
Name: "type",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Comment: "",
}
type geometryColumnColumns struct {
FTableCatalog column
FTableSchema column
FTableName column
FGeometryColumn column
CoordDimension column
Srid column
Type column
}
func (c geometryColumnColumns) AsSlice() []column {
return []column{
c.FTableCatalog, c.FTableSchema, c.FTableName, c.FGeometryColumn, c.CoordDimension, c.Srid, c.Type,
}
}
type geometryColumnIndexes struct{}
func (i geometryColumnIndexes) AsSlice() []index {
return []index{}
}
type geometryColumnForeignKeys struct{}
func (f geometryColumnForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type geometryColumnUniques struct{}
func (u geometryColumnUniques) AsSlice() []constraint {
return []constraint{}
}
type geometryColumnChecks struct{}
func (c geometryColumnChecks) AsSlice() []check {
return []check{}
}

View file

@ -0,0 +1,196 @@
// Code generated by BobGen psql v0.41.1. 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 H3Aggregations = Table[
h3AggregationColumns,
h3AggregationIndexes,
h3AggregationForeignKeys,
h3AggregationUniques,
h3AggregationChecks,
]{
Schema: "",
Name: "h3_aggregation",
Columns: h3AggregationColumns{
ID: column{
Name: "id",
DBType: "integer",
Default: "nextval('h3_aggregation_id_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Cell: column{
Name: "cell",
DBType: "h3index",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Resolution: column{
Name: "resolution",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Count: column{
Name: "count_",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
Type: column{
Name: "type_",
DBType: "public.h3aggregationtype",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
OrganizationID: column{
Name: "organization_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
},
Indexes: h3AggregationIndexes{
H3AggregationPkey: index{
Type: "btree",
Name: "h3_aggregation_pkey",
Columns: []indexColumn{
{
Name: "id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
H3AggregationCellOrganizationIDTypeKey: index{
Type: "btree",
Name: "h3_aggregation_cell_organization_id_type__key",
Columns: []indexColumn{
{
Name: "cell",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "organization_id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "type_",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false, false, false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "h3_aggregation_pkey",
Columns: []string{"id"},
Comment: "",
},
ForeignKeys: h3AggregationForeignKeys{
H3AggregationH3AggregationOrganizationIDFkey: foreignKey{
constraint: constraint{
Name: "h3_aggregation.h3_aggregation_organization_id_fkey",
Columns: []string{"organization_id"},
Comment: "",
},
ForeignTable: "organization",
ForeignColumns: []string{"id"},
},
},
Uniques: h3AggregationUniques{
H3AggregationCellOrganizationIDTypeKey: constraint{
Name: "h3_aggregation_cell_organization_id_type__key",
Columns: []string{"cell", "organization_id", "type_"},
Comment: "",
},
},
Comment: "",
}
type h3AggregationColumns struct {
ID column
Cell column
Resolution column
Count column
Type column
OrganizationID column
}
func (c h3AggregationColumns) AsSlice() []column {
return []column{
c.ID, c.Cell, c.Resolution, c.Count, c.Type, c.OrganizationID,
}
}
type h3AggregationIndexes struct {
H3AggregationPkey index
H3AggregationCellOrganizationIDTypeKey index
}
func (i h3AggregationIndexes) AsSlice() []index {
return []index{
i.H3AggregationPkey, i.H3AggregationCellOrganizationIDTypeKey,
}
}
type h3AggregationForeignKeys struct {
H3AggregationH3AggregationOrganizationIDFkey foreignKey
}
func (f h3AggregationForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.H3AggregationH3AggregationOrganizationIDFkey,
}
}
type h3AggregationUniques struct {
H3AggregationCellOrganizationIDTypeKey constraint
}
func (u h3AggregationUniques) AsSlice() []constraint {
return []constraint{
u.H3AggregationCellOrganizationIDTypeKey,
}
}
type h3AggregationChecks struct{}
func (c h3AggregationChecks) AsSlice() []check {
return []check{}
}

View file

@ -0,0 +1,222 @@
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
var RasterColumns = Table[
rasterColumnColumns,
rasterColumnIndexes,
rasterColumnForeignKeys,
rasterColumnUniques,
rasterColumnChecks,
]{
Schema: "",
Name: "raster_columns",
Columns: rasterColumnColumns{
RTableCatalog: column{
Name: "r_table_catalog",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RTableSchema: column{
Name: "r_table_schema",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RTableName: column{
Name: "r_table_name",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RRasterColumn: column{
Name: "r_raster_column",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Srid: column{
Name: "srid",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ScaleX: column{
Name: "scale_x",
DBType: "double precision",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ScaleY: column{
Name: "scale_y",
DBType: "double precision",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
BlocksizeX: column{
Name: "blocksize_x",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
BlocksizeY: column{
Name: "blocksize_y",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SameAlignment: column{
Name: "same_alignment",
DBType: "boolean",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RegularBlocking: column{
Name: "regular_blocking",
DBType: "boolean",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
NumBands: column{
Name: "num_bands",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
PixelTypes: column{
Name: "pixel_types",
DBType: "text[]",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
NodataValues: column{
Name: "nodata_values",
DBType: "double precision[]",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OutDB: column{
Name: "out_db",
DBType: "boolean[]",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Extent: column{
Name: "extent",
DBType: "geometry",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
SpatialIndex: column{
Name: "spatial_index",
DBType: "boolean",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Comment: "",
}
type rasterColumnColumns struct {
RTableCatalog column
RTableSchema column
RTableName column
RRasterColumn column
Srid column
ScaleX column
ScaleY column
BlocksizeX column
BlocksizeY column
SameAlignment column
RegularBlocking column
NumBands column
PixelTypes column
NodataValues column
OutDB column
Extent column
SpatialIndex column
}
func (c rasterColumnColumns) AsSlice() []column {
return []column{
c.RTableCatalog, c.RTableSchema, c.RTableName, c.RRasterColumn, c.Srid, c.ScaleX, c.ScaleY, c.BlocksizeX, c.BlocksizeY, c.SameAlignment, c.RegularBlocking, c.NumBands, c.PixelTypes, c.NodataValues, c.OutDB, c.Extent, c.SpatialIndex,
}
}
type rasterColumnIndexes struct{}
func (i rasterColumnIndexes) AsSlice() []index {
return []index{}
}
type rasterColumnForeignKeys struct{}
func (f rasterColumnForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type rasterColumnUniques struct{}
func (u rasterColumnUniques) AsSlice() []constraint {
return []constraint{}
}
type rasterColumnChecks struct{}
func (c rasterColumnChecks) AsSlice() []check {
return []check{}
}

View file

@ -0,0 +1,142 @@
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
var RasterOverviews = Table[
rasterOverviewColumns,
rasterOverviewIndexes,
rasterOverviewForeignKeys,
rasterOverviewUniques,
rasterOverviewChecks,
]{
Schema: "",
Name: "raster_overviews",
Columns: rasterOverviewColumns{
OTableCatalog: column{
Name: "o_table_catalog",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OTableSchema: column{
Name: "o_table_schema",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OTableName: column{
Name: "o_table_name",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ORasterColumn: column{
Name: "o_raster_column",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RTableCatalog: column{
Name: "r_table_catalog",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RTableSchema: column{
Name: "r_table_schema",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RTableName: column{
Name: "r_table_name",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
RRasterColumn: column{
Name: "r_raster_column",
DBType: "name",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
OverviewFactor: column{
Name: "overview_factor",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Comment: "",
}
type rasterOverviewColumns struct {
OTableCatalog column
OTableSchema column
OTableName column
ORasterColumn column
RTableCatalog column
RTableSchema column
RTableName column
RRasterColumn column
OverviewFactor column
}
func (c rasterOverviewColumns) AsSlice() []column {
return []column{
c.OTableCatalog, c.OTableSchema, c.OTableName, c.ORasterColumn, c.RTableCatalog, c.RTableSchema, c.RTableName, c.RRasterColumn, c.OverviewFactor,
}
}
type rasterOverviewIndexes struct{}
func (i rasterOverviewIndexes) AsSlice() []index {
return []index{}
}
type rasterOverviewForeignKeys struct{}
func (f rasterOverviewForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type rasterOverviewUniques struct{}
func (u rasterOverviewUniques) AsSlice() []constraint {
return []constraint{}
}
type rasterOverviewChecks struct{}
func (c rasterOverviewChecks) AsSlice() []check {
return []check{}
}

View file

@ -0,0 +1,146 @@
// Code generated by BobGen psql v0.41.1. 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 SpatialRefSys = Table[
spatialRefSyColumns,
spatialRefSyIndexes,
spatialRefSyForeignKeys,
spatialRefSyUniques,
spatialRefSyChecks,
]{
Schema: "",
Name: "spatial_ref_sys",
Columns: spatialRefSyColumns{
Srid: column{
Name: "srid",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
AuthName: column{
Name: "auth_name",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
AuthSrid: column{
Name: "auth_srid",
DBType: "integer",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Srtext: column{
Name: "srtext",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Proj4text: column{
Name: "proj4text",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Indexes: spatialRefSyIndexes{
SpatialRefSysPkey: index{
Type: "btree",
Name: "spatial_ref_sys_pkey",
Columns: []indexColumn{
{
Name: "srid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "spatial_ref_sys_pkey",
Columns: []string{"srid"},
Comment: "",
},
Checks: spatialRefSyChecks{
SpatialRefSysSridCheck: check{
constraint: constraint{
Name: "spatial_ref_sys_srid_check",
Columns: []string{"srid"},
Comment: "",
},
Expression: "((srid > 0) AND (srid <= 998999))",
},
},
Comment: "",
}
type spatialRefSyColumns struct {
Srid column
AuthName column
AuthSrid column
Srtext column
Proj4text column
}
func (c spatialRefSyColumns) AsSlice() []column {
return []column{
c.Srid, c.AuthName, c.AuthSrid, c.Srtext, c.Proj4text,
}
}
type spatialRefSyIndexes struct {
SpatialRefSysPkey index
}
func (i spatialRefSyIndexes) AsSlice() []index {
return []index{
i.SpatialRefSysPkey,
}
}
type spatialRefSyForeignKeys struct{}
func (f spatialRefSyForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type spatialRefSyUniques struct{}
func (u spatialRefSyUniques) AsSlice() []constraint {
return []constraint{}
}
type spatialRefSyChecks struct {
SpatialRefSysSridCheck check
}
func (c spatialRefSyChecks) AsSlice() []check {
return []check{
c.SpatialRefSysSridCheck,
}
}