Documentation
¶
Index ¶
Constants ¶
View Source
const ( FK_NONE = iota FK_RELATION_ONE_MANY FK_RELATION_ONE_ONE FK_RELATION_MANY_ONE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FKRelation ¶
type FKRelation = int8
type Field ¶
type Field struct { // desc *descriptor.FieldDescriptorProto Table *Table ColName string Type string MsgName string PK sqlgen.PK // dbfk string DbfkField string DbfkTable string FK FieldFK Order int Repeated bool IsMessage bool Extensions map[string]interface{} Column sqlgen.Column // contains filtered or unexported fields }
func (*Field) AddForeignKey ¶
func (f *Field) AddForeignKey(tm *TableMessages, table string, field string)
type FieldFK ¶
type FieldFK struct { // message *generator.Descriptor Remote *Field Relation FKRelation }
type Table ¶
type Table struct { GoPackageName string GoPackageImport string Engine string StoreName string Name string MsgName string // desc *generator.Descriptor Cols map[string]*Field JSONB bool Create bool Read bool Update bool Delete bool Imports map[string]string }
func (*Table) GetColumnByColumnName ¶
func (*Table) GetColumnByMessageName ¶
func (*Table) GetOrderedCols ¶
type TableMessages ¶
func (*TableMessages) GetTableByMessageName ¶
func (tm *TableMessages) GetTableByMessageName(tableName string) (*Table, bool)
func (*TableMessages) GetTableByTableName ¶
func (tm *TableMessages) GetTableByTableName(tableName string) (*Table, bool)
func (*TableMessages) GetTablesByStoreName ¶
func (tm *TableMessages) GetTablesByStoreName(storeName string) []*Table
Click to show internal directories.
Click to hide internal directories.