Loading indicator for loading the tree. Tree displays PK, FK, R, and U. Still some bugs with the connections and I want to implement a "connection manager" which the ability to change, edit, and delete connections. PLUS right now the tree view is only supported for PSQL. Need to use different queries for different SQL types. SOME types, like SQLlite, might not support the tree, and I will need a display for that. Plus errors are not handled, just bubbled and logged :|
21 lines
320 B
Go
21 lines
320 B
Go
package model
|
|
|
|
import "database/sql"
|
|
|
|
// Column data structure
|
|
type Column struct {
|
|
Name string
|
|
Type string
|
|
MaxLength sql.NullInt64
|
|
Nullable string
|
|
PrimaryKey bool
|
|
ForeignKey ForeignKey
|
|
Unique bool
|
|
}
|
|
|
|
type ForeignKey struct {
|
|
Column string
|
|
ForeignTable string
|
|
ForeignColumn string
|
|
}
|