Documentation ¶
Index ¶
- func GetDbCond(dialect, dbname string) string
- type BaseSchema
- type ColumnSchema
- type DBSchema
- func (s *DBSchema) GetColumns(tableName string) (columns []ColumnSchema)
- func (s *DBSchema) GetDbName(onlyFunc bool) (dbname string)
- func (s *DBSchema) GetTables(tableName, dbNameMatch string, isDesc bool) (tables []TableSchema)
- func (s *DBSchema) ListTable(tableName, dbNameMatch string, refresh bool) (tables []TableSchema)
- type TableSchema
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseSchema ¶
type BaseSchema struct { TableCatalog string `db:"TABLE_CATALOG"` TableSchema string `db:"TABLE_SCHEMA"` TableName string `db:"TABLE_NAME"` }
func (BaseSchema) DbName ¶
func (s BaseSchema) DbName(engine string) string
func (BaseSchema) Engine ¶
func (s BaseSchema) Engine() string
func (BaseSchema) String ¶
func (s BaseSchema) String() string
type ColumnSchema ¶
type ColumnSchema struct { ColumnName string `db:"COLUMN_NAME"` ColumnType string `db:"COLUMN_TYPE"` DataType string `db:"DATA_TYPE"` ColumnDefault string `db:"COLUMN_DEFAULT"` IsNullable string `db:"IS_NULLABLE"` ColumnKey string `db:"COLUMN_KEY"` Extra string `db:"EXTRA"` OrdinalPosition int64 `db:"ORDINAL_POSITION"` BaseSchema }
type DBSchema ¶
func (*DBSchema) GetColumns ¶
func (s *DBSchema) GetColumns(tableName string) (columns []ColumnSchema)
type TableSchema ¶
type TableSchema struct { TableRows int64 `db:"TABLE_ROWS"` AutoIncrement int64 `db:"AUTO_INCREMENT"` BaseSchema }
Click to show internal directories.
Click to hide internal directories.