From 2901740faad46b6a76c7c8ad56033ac411d94829 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Wed, 21 Mar 2018 13:38:08 -0600 Subject: [PATCH] Adjust documentation to provide additional information on the use of cursor.executemany() as requested (https://github.com/oracle/python-cx_Oracle/issues/153). --- doc/src/cursor.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/src/cursor.rst b/doc/src/cursor.rst index f769814..a91bfa8 100644 --- a/doc/src/cursor.rst +++ b/doc/src/cursor.rst @@ -176,7 +176,11 @@ Cursor Object Prepare a statement for execution against a database and then execute it against all parameter mappings or sequences found in the sequence parameters. The statement is managed in the same way as the - :meth:`~Cursor.execute()` method manages it. + :meth:`~Cursor.execute()` method manages it. If the size of the buffers + allocated for any of the parameters exceeds 2 GB, you will receive the + error "DPI-1015: array size of is too large", where varies with the + size of each element being allocated in the buffer. If you receive this + error, decrease the number of elements in the sequence parameters. When true, the batcherrors parameter enables batch error support within Oracle and ensures that the call succeeds even if an exception takes place @@ -187,6 +191,12 @@ Cursor Object retrieved from Oracle after the method has completed. The row counts can then be retrieved using :meth:`~Cursor.getarraydmlrowcounts()`. + For maximum efficiency, it is best to use the + :meth:`~Cursor.setinputsizes()` method to specify the parameter types and + sizes ahead of time; in particular, None is assumed to be a string of + length 1 so any values that are later bound as numbers or dates will raise + a TypeError exception. + .. method:: Cursor.executemanyprepared(numIters)