nidus-sync/dbinfo/bob_types.bob.go

83 lines
1.3 KiB
Go

// 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"
type Table[Cols columns, Idxs indexes, FKs foreignKeys, U uniques, C checks] struct {
Schema string
Name string
Columns Cols
Indexes Idxs
PrimaryKey *constraint
ForeignKeys FKs
Uniques U
Checks C
Comment string
}
type columns interface {
AsSlice() []column
}
type column struct {
Name string
DBType string
Default string
Comment string
Nullable bool
Generated bool
AutoIncr bool
}
type indexes interface {
AsSlice() []index
}
type index struct {
Type string
Name string
Columns []indexColumn
Unique bool
Comment string
NullsFirst []bool
NullsDistinct bool
Where string
Include []string
}
type indexColumn struct {
Name string
Desc null.Val[bool]
IsExpression bool
}
type constraint struct {
Name string
Columns []string
Comment string
}
type foreignKeys interface {
AsSlice() []foreignKey
}
type foreignKey struct {
constraint
ForeignTable string
ForeignColumns []string
}
type uniques interface {
AsSlice() []constraint
}
type checks interface {
AsSlice() []check
}
type check struct {
constraint
Expression string
}