[Python-ideas] Improved support for prepared SQL statements

M.-A. Lemburg mal at egenix.com
Mon Dec 1 13:24:57 CET 2014


On 01.12.2014 13:01, 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

For database questions, please use the DB-SIG:

https://mail.python.org/mailman/listinfo/db-sig

FWIW: The DB-API which the sqlite3 module implements, supports
implicit and explicit reuse of statements:

https://www.python.org/dev/peps/pep-0249/

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 01 2014)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2014-11-19: Released mxODBC Connect 2.1.1 ...     http://egenix.com/go65

::::: 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 Python-ideas mailing list