kjk / dbworkbench

Database workbench for Mac and Windows
MIT License
5 stars 1 forks source link

Make Client.Tables return more structure information #106

Open kjk opened 8 years ago

kjk commented 8 years ago

e.g. sth. like:

type Client interface {
    ....
    Tables() ([]*TableInfo, error)
    ....
}

type TableInfoCommon struct {
  Name string `json:"name"`
  Columns []ColumInfo
}

type ColumnInfo struct {
  Name string
  Type string
  IsNullable bool
  ....
}

type TableInfo struct {
  TableInfoCommon
  Extra map[string]string // or [][]string, like [["key1", "val1"], ["key2", "val2"]]
}