Project

General

Profile

« Previous | Next » 

Revision 2561

sql_gen.py: Added unwrap_func_call()

View differences:

lib/sql_gen.py
176 176
    if name != None: value = NamedCol(name, value)
177 177
    return value
178 178

  
179
def unwrap_func_call(func_call, check_name=None):
180
    '''Unwraps any function call to its first argument.
181
    Also removes any column renaming.
182
    '''
183
    func_call = remove_col_rename(func_call)
184
    if not isinstance(func_call, FunctionCall): return func_call
185
    
186
    if check_name != None:
187
        name = func_call.function.name
188
        assert name == None or name == check_name
189
    return func_call.args[0]
190

  
179 191
##### Conditions
180 192

  
181 193
class ColValueCond(Code):

Also available in: Unified diff