This requires a bunch of changes since the types on these tables are much closer to the underlying types of the Fieldseeker data we are getting back from the API. I now need to use proper UUID types everywhere, which means I had to modify the bob gen config to consistently use google UUID, my UUID library of choice. I also had to add the organization_id to all the fieldseeker tables since we rely on them existing for some of our compound queries. There were some changes to the API type signatures to get things to build. I may yet regret those.
132 lines
2.6 KiB
Go
132 lines
2.6 KiB
Go
// Code generated by BobGen psql v0.0.4-0.20251216163753-8e325b7c773a+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 Organizations = Table[
|
|
organizationColumns,
|
|
organizationIndexes,
|
|
organizationForeignKeys,
|
|
organizationUniques,
|
|
organizationChecks,
|
|
]{
|
|
Schema: "",
|
|
Name: "organization",
|
|
Columns: organizationColumns{
|
|
ID: column{
|
|
Name: "id",
|
|
DBType: "integer",
|
|
Default: "nextval('organization_id_seq'::regclass)",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Name: column{
|
|
Name: "name",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
ArcgisID: column{
|
|
Name: "arcgis_id",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
ArcgisName: column{
|
|
Name: "arcgis_name",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
FieldseekerURL: column{
|
|
Name: "fieldseeker_url",
|
|
DBType: "text",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: organizationIndexes{
|
|
OrganizationPkey: index{
|
|
Type: "btree",
|
|
Name: "organization_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "organization_pkey",
|
|
Columns: []string{"id"},
|
|
Comment: "",
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type organizationColumns struct {
|
|
ID column
|
|
Name column
|
|
ArcgisID column
|
|
ArcgisName column
|
|
FieldseekerURL column
|
|
}
|
|
|
|
func (c organizationColumns) AsSlice() []column {
|
|
return []column{
|
|
c.ID, c.Name, c.ArcgisID, c.ArcgisName, c.FieldseekerURL,
|
|
}
|
|
}
|
|
|
|
type organizationIndexes struct {
|
|
OrganizationPkey index
|
|
}
|
|
|
|
func (i organizationIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.OrganizationPkey,
|
|
}
|
|
}
|
|
|
|
type organizationForeignKeys struct{}
|
|
|
|
func (f organizationForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{}
|
|
}
|
|
|
|
type organizationUniques struct{}
|
|
|
|
func (u organizationUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type organizationChecks struct{}
|
|
|
|
func (c organizationChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|