Revision 1836
Added by Aaron Marcuse-Kubitza over 12 years ago
db_xml.py | ||
---|---|---|
52 | 52 |
elif xml_dom.is_text(child): conds[child_name] = xml_dom.value(child) |
53 | 53 |
else: raise Exception('Joins not supported yet') |
54 | 54 |
id_ = xml_dom.get_id(node) |
55 |
if id_ != '': conds[pkey(table)] = id_ # replace any existing pkey value
|
|
55 |
if id_ != None: conds[pkey(table)] = id_ # replace any existing pkey value
|
|
56 | 56 |
if fields == []: fields.append(pkey_) |
57 | 57 |
|
58 | 58 |
return sql.select(db, table, fields, conds, limit, start) |
Also available in: Unified diff
xml_dom.py: get_id(): If the node doesn't have an ID, assumes the node itself is the ID. This enables backward (child-to-parent) pointers whose target is a text element containing an ID, rather than a regular element with an ID attribute.