Revision 3029
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/xml_func.py | ||
---|---|---|
95 | 95 |
column_mode = has_rel_funcs and db == None |
96 | 96 |
items = list(xml_dom.NodeTextEntryIter(node)) |
97 | 97 |
|
98 |
if row_mode and name in rel_funcs: # row-based mode: evaluate using DB |
|
98 |
# Parse function |
|
99 |
if len(items) == 1 and items[0][0].isdigit(): # has single numeric param |
|
100 |
# pass-through optimization for aggregating functions with one arg |
|
101 |
value = items[0][1] # pass through first arg |
|
102 |
elif row_mode and name in rel_funcs: # row-based mode: evaluate using DB |
|
99 | 103 |
value = sql.put(db, name, dict(items)) |
100 | 104 |
elif column_mode and not name in structural_funcs: # column-based mode |
101 | 105 |
if name in rel_funcs: return # preserve relational functions |
Also available in: Unified diff
xml_func.py: process(): Added pass-through optimization for aggregating functions with one arg