Project

General

Profile

« Previous | Next » 

Revision 2899

sql.py: Added lock_table()

View differences:

lib/sql.py
463 463
        version = int(version)+1
464 464
    return sql_gen.add_suffix(name, '#'+str(version))
465 465

  
466
def lock_table(db, table, mode):
467
    table = sql_gen.as_Table(table)
468
    run_query(db, 'LOCK TABLE '+table.to_str(db)+' IN '+mode+' MODE')
469

  
466 470
def run_query_into(db, query, into=None, add_indexes_=False, **kw_args):
467 471
    '''Outputs a query to a temp table.
468 472
    For params, see run_query().

Also available in: Unified diff