Documentation ¶
Index ¶
- type DBClient
- type TableInfo
- type TableInfoColumn
- type TableSchemaAnalyser
- func (entity *TableSchemaAnalyser) QueryColumns(databaseName, table string) (rs []*TableInfoColumn, err error)
- func (entity *TableSchemaAnalyser) QueryStatistics(databaseName, table string) (rs []*TableStatistics, err error)
- func (entity *TableSchemaAnalyser) QueryTable(databaseName, table string) (tb *TableInfo, err error)
- type TableStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBClient ¶
type DBClient struct {
// contains filtered or unexported fields
}
DBClient 通用查询
func NewDBClient ¶
type TableInfoColumn ¶
type TableInfoColumn struct { ColumnName string `gorm:"column:COLUMN_NAME" json:"column_name"` DataType string `gorm:"column:DATA_TYPE" json:"data_type"` ColumnKey string `gorm:"column:COLUMN_KEY" json:"column_key"` IsNullable string `gorm:"column:IS_NULLABLE" json:"is_nullable"` ColumnType string `gorm:"column:COLUMN_TYPE" json:"column_type"` ColumnComment string `gorm:"column:COLUMN_COMMENT" json:"column_comment"` }
type TableSchemaAnalyser ¶
func NewTableSchemaAnalyser ¶
func NewTableSchemaAnalyser(url string) (*TableSchemaAnalyser, error)
func (*TableSchemaAnalyser) QueryColumns ¶
func (entity *TableSchemaAnalyser) QueryColumns(databaseName, table string) (rs []*TableInfoColumn, err error)
func (*TableSchemaAnalyser) QueryStatistics ¶
func (entity *TableSchemaAnalyser) QueryStatistics(databaseName, table string) (rs []*TableStatistics, err error)
func (*TableSchemaAnalyser) QueryTable ¶
func (entity *TableSchemaAnalyser) QueryTable(databaseName, table string) (tb *TableInfo, err error)
QueryTable 查询数据表基础信息
type TableStatistics ¶
type TableStatistics struct { TableSchema string `gorm:"column:TABLE_SCHEMA"` TableName string `gorm:"column:TABLE_NAME"` NoUnique bool `gorm:"column:NON_UNIQUE"` IndexName string `gorm:"column:INDEX_NAME"` SeqInIndex int `gorm:"column:SEQ_IN_INDEX"` ColumnName string `gorm:"column:COLUMN_NAME"` IndexComment string `gorm:"column:INDEX_COMMENT"` }
TableStatistics 数据表索引结构
Click to show internal directories.
Click to hide internal directories.