Oliver Vecernik wrote:
My first question is: why does sapdbapi only support 'named'? All other db's support 'pyformat'.
I doubt that *all* other dbs support pyformat (mxODBC probably doesn't). Implementing pyformat would have required to parse the SQL command and to replace all pyformat placeholders with SAP DB placeholders (? or :param). As tokenizing SQL is at least a bit tricky (with comments, ODBC extension syntax etc.), I decided against it. MySQL doesn't seem to have placeholders at the SQL level, so the driver author had to tokenize the SQL anyway to replace placeholders with the actual values.

It shouldn't be too difficult to implement it in subclasses of the connection and cursor classes.

Note that you can use either named paramters or quotation marks with SAP DB. Using named parameters does *not* mean that you can pass a dictionary to the .execute method.

Second question (not sapdbapi specific): why is there no 'BEGIN' for a transaction? As far as I found out a transaction is automatically started after a commit or rollback, but isn't 'BEGIN' specified by SQL-92?
A transaction is also started upon connect, so there is never a moment without a transaction.

Daniel Dittmar

--
Daniel Dittmar
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org



_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


Reply via email to