Documentation ¶
Overview ¶
Table schema description format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TableColumn ¶
func (TableColumn) String ¶
func (t TableColumn) String() string
func (TableColumn) ToSqlColumn ¶
func (t TableColumn) ToSqlColumn(tab string) *sql.Column
type TableMasterMetadata ¶
type TableMasterMetadata struct { Name string Schema TableSchema PKey []string Index [][]string Unique [][]string Options string }
func ParseTableMasterMetadata ¶
func ParseTableMasterMetadata(s *sqlparser.DDL) (md *TableMasterMetadata, err error)
func (*TableMasterMetadata) CompatibleWith ¶
func (t *TableMasterMetadata) CompatibleWith(sch *TableMetadata) (compatible bool)
func (*TableMasterMetadata) String ¶
func (t *TableMasterMetadata) String() string
type TableMetadata ¶
type TableMetadata struct { Name string Schema TableSchema From string }
func ParseTableMetadata ¶
func ParseTableMetadata(s *sqlparser.DDL) (md *TableMetadata, err error)
func (*TableMetadata) SqlSchema ¶
func (t *TableMetadata) SqlSchema() sql.Schema
func (*TableMetadata) String ¶
func (t *TableMetadata) String() string
type TableSchema ¶
type TableSchema []TableColumn
func FromTablespec ¶
func FromTablespec(sp *sqlparser.TableSpec) (ts TableSchema, err error)
func (TableSchema) Find ¶
func (t TableSchema) Find(col string) (TableColumn, bool)
func (TableSchema) Has ¶
func (t TableSchema) Has(col string) bool
func (TableSchema) String ¶
func (t TableSchema) String() string
func (TableSchema) ToSqlSchema ¶
func (t TableSchema) ToSqlSchema(tab string) sql.Schema
Click to show internal directories.
Click to hide internal directories.