()
| 83 | row_factory = getattr(rows, row_factory) |
| 84 | |
| 85 | def work(): |
| 86 | with conn_cls.connect(dsn) as conn: |
| 87 | with conn.transaction(force_rollback=True): |
| 88 | with conn.cursor(binary=fmt_out, row_factory=row_factory) as cur: |
| 89 | cur.execute(faker.drop_stmt) |
| 90 | cur.execute(faker.create_stmt) |
| 91 | with faker.find_insert_problem(conn): |
| 92 | cur.executemany(faker.insert_stmt, faker.records) |
| 93 | cur.execute(ph(cur, faker.select_stmt)) |
| 94 | |
| 95 | if fetch == "one": |
| 96 | while cur.fetchone() is not None: |
| 97 | pass |
| 98 | elif fetch == "many": |
| 99 | while cur.fetchmany(3): |
| 100 | pass |
| 101 | elif fetch == "all": |
| 102 | cur.fetchall() |
| 103 | elif fetch == "iter": |
| 104 | for rec in cur: |
| 105 | pass |
| 106 | |
| 107 | n = [] |
| 108 | gc.collect() |
no test coverage detected