Project

General

Profile

« Previous | Next » 

Revision 2812

sql.py: into_table_name(): Also parse hierarchical tables (mappings with a rank column) using a special syntax

View differences:

lib/sql.py
1098 1098
        else: str_ += in_col_str(value_in_col)
1099 1099
        
1100 1100
        str_ += ')'
1101
    else: str_ += '_pkeys'
1101
    else:
1102
        out_col = 'rank'
1103
        try: in_col = mapping[out_col]
1104
        except KeyError: str_ += '_pkeys'
1105
        else: # has a rank column, so hierarchical
1106
            str_ += '['+str(out_col)+'='+in_col_str(in_col)+']'
1102 1107
    return str_
1103 1108

  
1104 1109
def put_table(db, out_table, in_tables, mapping, row_ct_ref=None, into=None,

Also available in: Unified diff