Project

General

Profile

« Previous | Next » 

Revision 2313

db_xml.py: put_table(): Accept sql_gen.Table objects or strings instead of separate table and schema names

View differences:

map
294 294
                if sep == '': # only the table name was specified
295 295
                    table = schema
296 296
                    schema = None
297
            table = sql_gen.Table(table, schema)
297 298
            
298 299
            # Fetch rows
299 300
            if by_col: limit = 0 # only fetch column names
300 301
            else: limit = n
301
            cur = sql.select(in_db, sql_gen.Table(table, schema), limit=limit,
302
                start=start, cacheable=False)
302
            cur = sql.select(in_db, table, limit=limit, start=start,
303
                cacheable=False)
303 304
            col_names = list(sql.col_names(cur))
304 305
            
305 306
            if by_col:
......
307 308
                xml_func.strip(root)
308 309
                if debug: log_debug('Putting stripped:\n'+str(root))
309 310
                    # only calc if debug
310
                db_xml.put_table(in_db, root.firstChild, table, schema, n,
311
                    start, commit, row_ins_ct_ref)
311
                db_xml.put_table(in_db, root.firstChild, table, n, start,
312
                    commit, row_ins_ct_ref)
312 313
                row_ct = 0 # unknown for now
313 314
            else:
314 315
                # Use normal by-row method

Also available in: Unified diff