Versions in this module Expand all Collapse all v0 v0.17.19 Apr 6, 2022 Changes in this version + var ErrFromEdgeNotFound = errors.New("from edge not found") + var ErrPathNotFound = errors.New("path not found") + var ErrThoughNodeNotFound = errors.New("though node not found") + var ErrToEdgeNotFound = errors.New("to edge not found") + type DBColumn struct + Array bool + Blocked bool + FKeyCol string + FKeySchema string + FKeyTable string + FullText bool + ID int32 + Name string + NotNull bool + PrimaryKey bool + Schema string + Table string + Type string + UniqueKey bool + func DiscoverColumns(db *sql.DB, dbtype string, blockList []string) ([]DBColumn, error) + func (col DBColumn) String() string + type DBFuncParam struct + ID int + Name sql.NullString + Type string + type DBFunction struct + Name string + Params []DBFuncParam + func DiscoverFunctions(db *sql.DB, blockList []string) ([]DBFunction, error) + type DBInfo struct + Functions []DBFunction + Name string + Schema string + Tables []DBTable + Type string + VTables []VirtualTable + Version int + func GetDBInfo(db *sql.DB, dbType string, blockList []string) (*DBInfo, error) + func GetTestDBInfo() *DBInfo + func NewDBInfo(dbType string, dbVersion int, dbSchema string, dbName string, cols []DBColumn, ...) *DBInfo + func (di *DBInfo) AddTable(t DBTable) + func (di *DBInfo) GetColumn(schema, table, column string) (*DBColumn, error) + func (di *DBInfo) GetTable(schema, table string) (*DBTable, error) + func (di *DBInfo) Hash() uint64 + type DBRel struct + Left DBRelLeft + Right DBRelRight + Type RelType + func PathToRel(p TPath) DBRel + func (re *DBRel) String() string + type DBRelLeft struct + Col DBColumn + Ti DBTable + type DBRelRight struct + Col DBColumn + Ti DBTable + VTable string + type DBSchema struct + SingularSuffix string + func GetTestSchema() (*DBSchema, error) + func NewDBSchema(info *DBInfo, aliases map[string][]string) (*DBSchema, error) + func (s *DBSchema) DBName() string + func (s *DBSchema) DBSchema() string + func (s *DBSchema) DBType() string + func (s *DBSchema) DBVersion() int + func (s *DBSchema) Find(schema, name string) (DBTable, error) + func (s *DBSchema) FindPath(from, to, through string) ([]TPath, error) + func (s *DBSchema) GetAliases() map[string]DBTable + func (s *DBSchema) GetFirstDegree(schema, table string) (map[string]DBTable, error) + func (s *DBSchema) GetFunctions() map[string]DBFunction + func (s *DBSchema) GetSecondDegree(schema, table string) (map[string]DBTable, error) + func (s *DBSchema) GetTables() []DBTable + func (s *DBSchema) IsAlias(name string) bool + type DBTable struct + Blocked bool + Columns []DBColumn + FullText []DBColumn + Name string + PrimaryCol DBColumn + Schema string + SecondaryCol DBColumn + Type string + func NewDBTable(schema, name, _type string, cols []DBColumn) DBTable + func (ti *DBTable) ColumnExists(name string) (DBColumn, bool) + func (ti *DBTable) GetColumn(name string) (DBColumn, error) + func (ti *DBTable) String() string + type RelType int + const RelEmbedded + const RelNone + const RelOneToMany + const RelOneToOne + const RelPolymorphic + const RelRecursive + const RelRemote + const RelSkip + func (i RelType) String() string + type TEdge struct + CName string + From int32 + L DBColumn + LT DBTable + R DBColumn + RT DBTable + To int32 + Type RelType + Weight int32 + type TPath struct + LC DBColumn + LT DBTable + RC DBColumn + RT DBTable + Rel RelType + type VirtualTable struct + FKeyColumn string + IDColumn string + Name string + TypeColumn string