Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotConnected = errors.New("not connected")
Functions ¶
This section is empty.
Types ¶
type ColumnSchema ¶
type ColumnSchema struct {
Type interface{} `json:"type"`
}
func (ColumnSchema) RefersTo ¶
func (column ColumnSchema) RefersTo() map[string]string
type DatabaseSchema ¶
type DatabaseSchema struct { Name string `json:"name"` Version string `json:"version"` Checksum string `json:"cksum,omitempty"` Tables map[string]TableSchema `json:"tables"` }
func NewDatabaseSchema ¶
func NewDatabaseSchema(opt SchemaOption) (*DatabaseSchema, error)
func (DatabaseSchema) OrderedColumns ¶
func (database DatabaseSchema) OrderedColumns() map[string][]string
OrderedColumns returns all column names ordered by a numeric index for each table in the schema
type SchemaOption ¶ added in v1.1.0
type TableSchema ¶
type TableSchema struct { Columns map[string]ColumnSchema `json:"columns"` ColumnOrder []string MaxRows int `json:"maxrows,omitempty"` IsRoot bool `json:"isRoot,omitempty"` Indexes [][]string `json:"indexes,omitempty"` }
func (TableSchema) IsIndex ¶
func (table TableSchema) IsIndex(columnName string) bool
FIXME: Doesn't support composite indexes
Click to show internal directories.
Click to hide internal directories.