Revision 2088
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/db_xml.py | ||
---|---|---|
138 | 138 |
def qual_name(table): return sql.qual_name(db, in_schema, table) |
139 | 139 |
def pkey(table): return sql.pkey(db, table, True) |
140 | 140 |
|
141 |
def put_table_(node): |
|
142 |
return put_table(db, node, in_table, in_schema, commit, row_ct_ref) |
|
143 |
|
|
141 | 144 |
out_table = name_of(node) |
142 | 145 |
pkey_ = pkey(out_table) |
143 | 146 |
row = {} |
... | ... | |
150 | 153 |
if xml_dom.is_empty(child): row[child_name] = None |
151 | 154 |
elif xml_dom.is_text(child): |
152 | 155 |
row[child_name] = strings.to_unicode(xml_dom.value(child)) |
153 |
elif is_ptr(child_name): pass#row[child_name] = put_(ptr_target(child)) |
|
156 |
elif is_ptr(child_name): |
|
157 |
table, row[child_name] = put_table_(ptr_target(child)) |
|
158 |
in_tables.append(table) |
|
154 | 159 |
else: children.append(child) |
155 | 160 |
try: del row[pkey_] |
156 | 161 |
except KeyError: pass |
Also available in: Unified diff
db_xml.py: put_table(): Recurse into forward pointers