Revision 2813
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/db_xml.py | ||
---|---|---|
128 | 128 |
|
129 | 129 |
def __str__(self): return self.name |
130 | 130 |
|
131 |
def into_table_name(out_table, row, is_func): |
|
132 |
into = None |
|
133 |
if not is_func: |
|
134 |
out_col = 'rank' |
|
135 |
try: in_col = row[out_col] |
|
136 |
except KeyError: pass |
|
137 |
else: # has a rank column, so hierarchical |
|
138 |
col_name = str(sql_gen.remove_col_rename(in_col)) |
|
139 |
into = out_table+'['+out_col+'='+col_name+']' |
|
140 |
return into |
|
141 |
|
|
142 | 131 |
input_col_prefix = '$' |
143 | 132 |
|
144 | 133 |
put_table_special_funcs = set(['_simplifyPath']) |
... | ... | |
236 | 225 |
|
237 | 226 |
# Insert node |
238 | 227 |
pkeys_loc = sql.put_table(db, out_table, in_tables, row, row_ins_ct_ref, |
239 |
into_table_name(out_table, row, is_func), next, is_func, on_error)
|
|
228 |
None, next, is_func, on_error)
|
|
240 | 229 |
if commit: db.db.commit() |
241 | 230 |
|
242 | 231 |
# Insert children with fkeys to parent |
Also available in: Unified diff
db_xml.py: Removed into_table_name() because this functionality is now handled by sql.into_table_name()