Documentation ¶
Index ¶
- func GetColumns(db *sql.DB, dbtype string, tables []string) (map[string][]DBColumn, error)
- type DBColumn
- type DBFuncParam
- type DBFunction
- type DBInfo
- type DBRel
- type DBSchema
- func (s *DBSchema) DBVersion() int
- func (s *DBSchema) GetAliasTable(name, parent string) (string, bool)
- func (s *DBSchema) GetAliases(parent string) []string
- func (s *DBSchema) GetFunctions() map[string]DBFunction
- func (s *DBSchema) GetRel(child, parent, through string) (DBRel, error)
- func (s *DBSchema) GetTableInfo(name, parent string) (DBTableInfo, error)
- func (s *DBSchema) GetTableInfoB(name, parent string) (DBTableInfo, error)
- func (s *DBSchema) GetTableNames() []string
- func (s *DBSchema) SetRel(child, parent string, rel DBRel) error
- func (s *DBSchema) Type() string
- type DBTable
- type DBTableInfo
- type RelType
- type VirtualTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBColumn ¶
type DBFuncParam ¶
type DBFuncParam struct { ID int Name sql.NullString Type string }
type DBFunction ¶
type DBFunction struct { Name string Params []DBFuncParam }
func GetFunctions ¶
func GetFunctions(db *sql.DB, blockList []string) ([]DBFunction, error)
type DBInfo ¶
type DBInfo struct { Version int Type string Tables []DBTable Columns [][]DBColumn Functions []DBFunction VTables []VirtualTable // contains filtered or unexported fields }
func GetTestDBInfo ¶
func GetTestDBInfo() *DBInfo
type DBRel ¶
type DBRel struct { Type RelType Through struct { ColL DBColumn ColR DBColumn } Left struct { Ti DBTableInfo Col DBColumn } Right struct { VTable string Ti DBTableInfo Col DBColumn } }
type DBSchema ¶
type DBSchema struct {
// contains filtered or unexported fields
}
func GetTestSchema ¶
func (*DBSchema) GetAliasTable ¶ added in v0.15.53
func (*DBSchema) GetAliases ¶ added in v0.15.50
func (*DBSchema) GetFunctions ¶
func (s *DBSchema) GetFunctions() map[string]DBFunction
func (*DBSchema) GetTableInfo ¶
func (s *DBSchema) GetTableInfo(name, parent string) (DBTableInfo, error)
func (*DBSchema) GetTableInfoB ¶
func (s *DBSchema) GetTableInfoB(name, parent string) (DBTableInfo, error)
func (*DBSchema) GetTableNames ¶
type DBTableInfo ¶
type DBTableInfo struct { Name string Type string IsSingular bool IsAlias bool Columns []DBColumn PrimaryCol DBColumn TSVCol DBColumn Singular string Plural string Blocked bool Schema *DBSchema // contains filtered or unexported fields }
func (*DBTableInfo) ColumnExists ¶
func (ti *DBTableInfo) ColumnExists(name string) bool
func (*DBTableInfo) GetColumnB ¶
func (ti *DBTableInfo) GetColumnB(name string) (DBColumn, error)
func (*DBTableInfo) String ¶
func (ti *DBTableInfo) String() string
Click to show internal directories.
Click to hide internal directories.