Project

General

Profile

« Previous | Next » 

Revision 2337

sql.py: mk_insert_select(): embeddable: Use new sql_gen.NamedTable

View differences:

lib/sql.py
543 543
                function_name = next_version(function_name)
544 544
                # try again with next version of name
545 545
        
546
        # Return query that uses function; AS clause requires function alias
547
        return mk_select(db, sql_gen.CustomCode(function+'() AS f ('
548
            +returning_name+')'), start=0, order_by=None)
546
        # Return query that uses function
547
        func_table = sql_gen.NamedTable('f', sql_gen.CustomCode(function+'()'),
548
            [returning_name]) # AS clause requires function alias
549
        return mk_select(db, func_table, start=0, order_by=None)
549 550
    
550 551
    return (query, params)
551 552

  

Also available in: Unified diff