[cx-oracle-users] Distinguishing between select and update/delete/insert
Brought to you by:
atuining
From: Mihai I. <mi...@re...> - 2006-01-11 23:52:56
|
Hi, Is there a way one can prepare a query and determine its type? (select/update/insert/delete). The reason: executemany() only applies to update/insert/delete. I have a module that executes queries passed in by the user, and gets the bind params from a .csv file. It would be nice to know when I can use execute vs. executemany. It also helps to know if one has to fetch a result set (in case of a select) or not do anything (for insert/update/delete). I know in OCI you can check the type by comparing to OCI_STMT_SELECT et al - is the statement type somewhat exposed at the Python level? Thanks, Misa |