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.
147 lines
3.3 KiB
Go
147 lines
3.3 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 NoteImageData = Table[
|
|
noteImageDatumColumns,
|
|
noteImageDatumIndexes,
|
|
noteImageDatumForeignKeys,
|
|
noteImageDatumUniques,
|
|
noteImageDatumChecks,
|
|
]{
|
|
Schema: "",
|
|
Name: "note_image_data",
|
|
Columns: noteImageDatumColumns{
|
|
Created: column{
|
|
Name: "created",
|
|
DBType: "timestamp without time zone",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
NoteImageVersion: column{
|
|
Name: "note_image_version",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
NoteImageUUID: column{
|
|
Name: "note_image_uuid",
|
|
DBType: "uuid",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Type: column{
|
|
Name: "type_",
|
|
DBType: "public.audiodatatype",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: noteImageDatumIndexes{
|
|
NoteImageDataPkey: index{
|
|
Type: "btree",
|
|
Name: "note_image_data_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "note_image_version",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "note_image_uuid",
|
|
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: "note_image_data_pkey",
|
|
Columns: []string{"note_image_version", "note_image_uuid", "type_"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: noteImageDatumForeignKeys{
|
|
NoteImageDataNoteImageDataNoteImageVersionNoteImageUUIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "note_image_data.note_image_data_note_image_version_note_image_uuid_fkey",
|
|
Columns: []string{"note_image_version", "note_image_uuid"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "note_image",
|
|
ForeignColumns: []string{"version", "uuid"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type noteImageDatumColumns struct {
|
|
Created column
|
|
NoteImageVersion column
|
|
NoteImageUUID column
|
|
Type column
|
|
}
|
|
|
|
func (c noteImageDatumColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Created, c.NoteImageVersion, c.NoteImageUUID, c.Type,
|
|
}
|
|
}
|
|
|
|
type noteImageDatumIndexes struct {
|
|
NoteImageDataPkey index
|
|
}
|
|
|
|
func (i noteImageDatumIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.NoteImageDataPkey,
|
|
}
|
|
}
|
|
|
|
type noteImageDatumForeignKeys struct {
|
|
NoteImageDataNoteImageDataNoteImageVersionNoteImageUUIDFkey foreignKey
|
|
}
|
|
|
|
func (f noteImageDatumForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.NoteImageDataNoteImageDataNoteImageVersionNoteImageUUIDFkey,
|
|
}
|
|
}
|
|
|
|
type noteImageDatumUniques struct{}
|
|
|
|
func (u noteImageDatumUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type noteImageDatumChecks struct{}
|
|
|
|
func (c noteImageDatumChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|