Project

General

Profile

« Previous | Next » 

Revision 3917

sql_io.py: put_table(): is_literals: Fixed bug where sql.select() that calls the function needed to be run recoverably, to auto-rollback errors. Made sql.select() cacheable because SQL functions are immutable, so it should be idempotent.

View differences:

lib/sql_io.py
506 506
        try:
507 507
            cur = None
508 508
            if is_function:
509
                if is_literals: cur = sql.select(db, fields=[func_call])
509
                if is_literals:
510
                    cur = sql.select(db, fields=[func_call], recover=True,
511
                        cacheable=True)
510 512
                else: insert_into_pkeys(wrapper_table, recover=True)
511 513
            else:
512 514
                cur = sql.insert_select(db, out_table, mapping.keys(),

Also available in: Unified diff