Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildOf ¶
func NewChildOf ¶
type Column ¶
type Column struct {
Name string
ForeignKey *ForeignKey
FieldDescriptor protoreflect.FieldDescriptor
IsPrimaryKey bool
IsUnique bool
IsRepeated bool
IsExtension bool
IsMessage bool
IsOptional bool
Nested *Table
Message string
ConvertTo *v1.StringConvertion
}
func NewColumn ¶
func NewColumn(d protoreflect.FieldDescriptor, fieldInfo *v1.Column, ordinal int, inlineDepth int) (*Column, error)
func (*Column) QuotedName ¶
type ForeignKey ¶
func NewForeignKey ¶
func NewForeignKey(foreignKey string) (*ForeignKey, error)
type PrimaryKey ¶
type PrimaryKey struct {
Name string
FieldDescriptor protoreflect.FieldDescriptor
Index int
}
type Schema ¶
type Schema struct {
Name string
TableRegistry map[string]*Table
// contains filtered or unexported fields
}
func NewSchema ¶
func NewSchema(name string, rootMessageDescriptor protoreflect.MessageDescriptor, withProtoOption bool, logger *zap.Logger) (*Schema, error)
func (*Schema) ChangeName ¶
type Table ¶
type Table struct {
Name string
PrimaryKey *PrimaryKey
ChildOf *ChildOf
Columns []*Column
Ordinal int
InlineDepth int
PbTableInfo *pbSchmema.Table
}
func NewTable ¶
func NewTable(descriptor protoreflect.MessageDescriptor, tableInfo *pbSchmema.Table, ordinal int, inlineDepth int) (*Table, error)
func (*Table) ColumnByFieldName ¶
ColumnByFieldName returns the column matching the given protobuf field name, or nil if not found.
Click to show internal directories.
Click to hide internal directories.