Project

General

Profile

« Previous | Next » 

Revision 3688

xml_func.py: process(): In row-based mode, when trying to evaluate function using DB, preserve unknown funcs because these might be built-in functions of db_xml.put(). The sql.DoesNotExistException should be raised again when db_xml.put() is run and it verifies whether the function is built-in or not (e.g. _simplifyPath is now built-in, for column-based support). See db_xml.put_special_funcs for built-in functions.

View differences:

xml_func.py
10 10
import exc
11 11
import format
12 12
import maps
13
import sql
13 14
import sql_io
14 15
import strings
15 16
import term
......
107 108
        # pass-through optimization for aggregating functions with one arg
108 109
        value = items[0][1] # pass through first arg
109 110
    elif row_mode and (is_rel_func(name) or func == None): # row-based mode
110
        value = sql_io.put(db, name, dict(items)) # evaluate using DB
111
        try: value = sql_io.put(db, name, dict(items)) # evaluate using DB
112
        except sql.DoesNotExistException: return # preserve unknown funcs
113
            # possibly a built-in function of db_xml.put()
111 114
    elif (column_mode and not name in structural_funcs) or func == None:
112 115
        # local XML function can't be used or does not exist
113 116
        if column_mode and is_rel_func(name): return # preserve relational funcs

Also available in: Unified diff