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.
236 lines
5 KiB
Go
236 lines
5 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 PublicreportQuicks = Table[
|
|
publicreportQuickColumns,
|
|
publicreportQuickIndexes,
|
|
publicreportQuickForeignKeys,
|
|
publicreportQuickUniques,
|
|
publicreportQuickChecks,
|
|
]{
|
|
Schema: "publicreport",
|
|
Name: "quick",
|
|
Columns: publicreportQuickColumns{
|
|
ID: column{
|
|
Name: "id",
|
|
DBType: "integer",
|
|
Default: "nextval('publicreport.quick_id_seq'::regclass)",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Created: column{
|
|
Name: "created",
|
|
DBType: "timestamp without time zone",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Comments: column{
|
|
Name: "comments",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Location: column{
|
|
Name: "location",
|
|
DBType: "geography",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
H3cell: column{
|
|
Name: "h3cell",
|
|
DBType: "h3index",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
PublicID: column{
|
|
Name: "public_id",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
ReporterEmail: column{
|
|
Name: "reporter_email",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
ReporterPhone: column{
|
|
Name: "reporter_phone",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Address: column{
|
|
Name: "address",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Status: column{
|
|
Name: "status",
|
|
DBType: "publicreport.reportstatustype",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
OrganizationID: column{
|
|
Name: "organization_id",
|
|
DBType: "integer",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: publicreportQuickIndexes{
|
|
QuickPkey: index{
|
|
Type: "btree",
|
|
Name: "quick_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
QuickPublicIDKey: index{
|
|
Type: "btree",
|
|
Name: "quick_public_id_key",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "public_id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "quick_pkey",
|
|
Columns: []string{"id"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: publicreportQuickForeignKeys{
|
|
PublicreportQuickQuickOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.quick.quick_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
Uniques: publicreportQuickUniques{
|
|
QuickPublicIDKey: constraint{
|
|
Name: "quick_public_id_key",
|
|
Columns: []string{"public_id"},
|
|
Comment: "",
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type publicreportQuickColumns struct {
|
|
ID column
|
|
Created column
|
|
Comments column
|
|
Location column
|
|
H3cell column
|
|
PublicID column
|
|
ReporterEmail column
|
|
ReporterPhone column
|
|
Address column
|
|
Status column
|
|
OrganizationID column
|
|
}
|
|
|
|
func (c publicreportQuickColumns) AsSlice() []column {
|
|
return []column{
|
|
c.ID, c.Created, c.Comments, c.Location, c.H3cell, c.PublicID, c.ReporterEmail, c.ReporterPhone, c.Address, c.Status, c.OrganizationID,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickIndexes struct {
|
|
QuickPkey index
|
|
QuickPublicIDKey index
|
|
}
|
|
|
|
func (i publicreportQuickIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.QuickPkey, i.QuickPublicIDKey,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickForeignKeys struct {
|
|
PublicreportQuickQuickOrganizationIDFkey foreignKey
|
|
}
|
|
|
|
func (f publicreportQuickForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.PublicreportQuickQuickOrganizationIDFkey,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickUniques struct {
|
|
QuickPublicIDKey constraint
|
|
}
|
|
|
|
func (u publicreportQuickUniques) AsSlice() []constraint {
|
|
return []constraint{
|
|
u.QuickPublicIDKey,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickChecks struct{}
|
|
|
|
func (c publicreportQuickChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|