Top Level Namespace
Defined in:
Method Summary
-
all_layout(pks, table_and_attr, levels_IN, fkdefinitions, fkdefinitions_groupedby_fromtable, layoutdims, theDatabaseName, path_or_database, command_line_args)
Distribute tables into a matrix.
- arrow(p1, p2, arrownumber)
- colname_to_index(colname)
- find_tlbrelat_by_name(alltblobj, thename)
- gen_connections(alltblobj, allfkconnections, layoutdims, layout_COLUMNS, layout_ROWS, command_line_args)
- get_args
-
get_cover_svg(width_PX, height_PX, databasename, tables_as_as_svg, connections_as_svg, scale)
=====================================================
-
myGroupBy(rows, grpon)
Will collect Arrara(rows) into groups depending on Array(grpon)
Method Detail
def all_layout(pks, table_and_attr, levels_IN, fkdefinitions, fkdefinitions_groupedby_fromtable, layoutdims, theDatabaseName, path_or_database, command_line_args)
#
Distribute tables into a matrix. Each matrix cell holds a table - or is empty
Levels
- First row - or column in case of transposed - holds all entity table names sorted on name
- Each level holds table names which refers tabel in upper levels only
Steps
- (f_lay4) Find levels, create table obj for each cell, assign pks, attr and fkdefs for each table obj Also assign size of each cell due size of table object
- (f_lay5) Build spacings between table object due lines for foreign values
- (f_lay6) Calculate x and for each table
- (f-lay8) Collect all connections due to foreign keys
def gen_connections(alltblobj, allfkconnections, layoutdims, layout_COLUMNS, layout_ROWS, command_line_args)
#
def get_cover_svg(width_PX, height_PX, databasename, tables_as_as_svg, connections_as_svg, scale)
#
=====================================================
def myGroupBy(rows, grpon)
#
Will collect Arrara(rows) into groups depending on Array(grpon)
rows are [[1,2,3,4],[5,6,7,8],[1,2,4,3]]
and grpon is [0,1]
then myGroupBy(rows, grpon) will be
result is Hash{[1,2]=>[[1,2,3,4],[1,2,4,3],[5,6]=>[[5,6,7,8]]}