Project

General

Profile

« Previous | Next » 

Revision 2343

sql.py: mk_select(): joins: Use new table_not_null_col() instead of pkey() to get a non-NULL column to filter out on

View differences:

lib/sql.py
462 462
    # Add joins
463 463
    left_table = table0
464 464
    for join_ in tables:
465
        # Parse special values
466 465
        table = join_.table
467
        if join_.type_ is sql_gen.filter_out:
468
            conds[sql_gen.Col(pkey(db, table), table)] = None # filter no match
469 466
        
467
        # Parse special values
468
        if join_.type_ is sql_gen.filter_out: # filter no match
469
            conds[sql_gen.Col(table_not_null_col(db, table), table)] = None
470
        
470 471
        query += ' '+join_.to_str(db, left_table)
471 472
        
472 473
        left_table = table

Also available in: Unified diff