The current implementation of
cursor.executemany does not accept iterators. If one invokes the method as follows:
# .... records = iter([1, 2, 3, 4, 5]) cursor.executemany(my_insert_statement, records)
The following TypeError is returned
TypeError: must be list, not list_iterator
When working with large data, it becomes impractical store all records in memory. Having the ability to supply an iterator would alleviate this constraint. This would also make cx_Oracle compatible with other libraries such as petl.
cursor.executemany should accept iterators as well as in memory data structures.