[DB-SIG] Insert for Oracledb

M.-A. Lemburg lemburg@uni-duesseldorf.de
Sat, 22 Nov 1997 16:56:01 +0100

Magnus Lycka wrote:
> I understand that you get the impression that you would be able to do
> multiple inserts from the DBI spec though. I honestly don't know what
> the list-of-tuples is for. Can anyone enlighten me about that? It would
> be nice if it looped through a supplied list if it recieved several tuples
> and performed the command for each of them, although it's not really something
> you need, and if you have several inserts of updates, you will probably
> want to
> check for error conditions after each one anyway (although that might not be
> a problem if exceptions are used in a proper way I guess).

There seems to be a misunderstanding here:

If you pass a list of tuples to the cursor.execute() method as
parameter, then the command given will be executed for each tuple
in the list. The implementation can do this either in one go, or
a by calling the execute API for every item.

Marc-Andre Lemburg

DB-SIG  - SIG on Tabular Databases in Python

send messages to: db-sig@python.org
administrivia to: db-sig-request@python.org