Project

General

Profile

« Previous | Next » 

Revision 2270

sql_gen.py: as_Table(): Accept tables that are Code objects, not just Table objects

View differences:

lib/sql_gen.py
34 34
    def to_str(self, db): return sql.qual_name(db, self.schema, self.name)
35 35

  
36 36
def as_Table(table):
37
    if table == None or isinstance(table, Table): return table
37
    if table == None or isinstance(table, Code): return table
38 38
    elif isinstance(table, tuple):
39 39
        schema, table = table
40 40
        return Table(table, schema)

Also available in: Unified diff