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.
132 lines
3.1 KiB
Go
132 lines
3.1 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 PublicreportQuickImages = Table[
|
|
publicreportQuickImageColumns,
|
|
publicreportQuickImageIndexes,
|
|
publicreportQuickImageForeignKeys,
|
|
publicreportQuickImageUniques,
|
|
publicreportQuickImageChecks,
|
|
]{
|
|
Schema: "publicreport",
|
|
Name: "quick_image",
|
|
Columns: publicreportQuickImageColumns{
|
|
ImageID: column{
|
|
Name: "image_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
QuickID: column{
|
|
Name: "quick_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: publicreportQuickImageIndexes{
|
|
QuickImagePkey: index{
|
|
Type: "btree",
|
|
Name: "quick_image_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "image_id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "quick_id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false, false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "quick_image_pkey",
|
|
Columns: []string{"image_id", "quick_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: publicreportQuickImageForeignKeys{
|
|
PublicreportQuickImageQuickImageImageIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.quick_image.quick_image_image_id_fkey",
|
|
Columns: []string{"image_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "publicreport.image",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
PublicreportQuickImageQuickImageQuickIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.quick_image.quick_image_quick_id_fkey",
|
|
Columns: []string{"quick_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "publicreport.quick",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type publicreportQuickImageColumns struct {
|
|
ImageID column
|
|
QuickID column
|
|
}
|
|
|
|
func (c publicreportQuickImageColumns) AsSlice() []column {
|
|
return []column{
|
|
c.ImageID, c.QuickID,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickImageIndexes struct {
|
|
QuickImagePkey index
|
|
}
|
|
|
|
func (i publicreportQuickImageIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.QuickImagePkey,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickImageForeignKeys struct {
|
|
PublicreportQuickImageQuickImageImageIDFkey foreignKey
|
|
PublicreportQuickImageQuickImageQuickIDFkey foreignKey
|
|
}
|
|
|
|
func (f publicreportQuickImageForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.PublicreportQuickImageQuickImageImageIDFkey, f.PublicreportQuickImageQuickImageQuickIDFkey,
|
|
}
|
|
}
|
|
|
|
type publicreportQuickImageUniques struct{}
|
|
|
|
func (u publicreportQuickImageUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type publicreportQuickImageChecks struct{}
|
|
|
|
func (c publicreportQuickImageChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|