[DB-SIG] Improved support for prepared SQL statements

M.-A. Lemburg mal at egenix.com
Tue Dec 9 10:40:44 CET 2014


On 07.12.2014 22:06, SF Markus Elfring wrote:
> Hello,
> 
> An interface for parameterised SQL statements (working with
> placeholders) is provided by the execute() method from the Cursor class
> at the moment.
> https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.execute
> 
> I assume that the "SQL Statement Object" from the SQLite C interface is
> reused there already.
> http://sqlite.org/c3ref/stmt.html
> 
> I imagine that it will be more efficient occasionally to offer also a
> base class like "prepared_statement" so that the parameter specification
> does not need to be parsed for every passed command.
> I suggest to improve corresponding preparation and compilation
> possibilities.
> https://bugs.python.org/issue22956

Please see our previous discussion on this subject:

https://mail.python.org/pipermail/db-sig/2014-March/006090.html

This was the first draft result of that discussion:

https://mail.python.org/pipermail/db-sig/2014-March/006096.html

It's not yet been added to the DB-API as standard extension. Perhaps
we ought to continue that discussion.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 09 2014)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Plone/Zope.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2014-12-02: Released mxODBC Connect 2.1.2 ...     http://egenix.com/go66

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the DB-SIG mailing list