Magnus Lycka wrote:
> Vittorio wrote:
> Using the same symbol for both string substitutions and SQL placeholder
> such as pysqlite 1 and the MySQL interface does, is not really a bright
> idea in my opinion. Who thinks this is pretty?
>
> sql = "SELECT %s FROM %s WHERE %s = %%s"
> cur.execute(sql
Gerhard Häring ha scritto:
> The reason why pysqlite 0.x/1.x used paramstyle "pyformat", based on
> Python string substitution for SQL parameters is that at the time
> pysqlite was started, SQLite 2.x did not have any support for parameter
> binding. So we had to "fake" it in Python, just like th
On Wed, 09 Nov 2005 17:57:46 +, Steve Holden <[EMAIL PROTECTED]> wrote:
>Gerhard Häring wrote:
>> Vittorio wrote:
>>
> [snip]
>>
>> I think about the only place I wrote a bit about the differences was in
>> the pysqlite 2.0 final announcement:
>>
>> http://lists.initd.org/pipermail/pysqlite/200
Gerhard Häring wrote:
> Vittorio wrote:
>
>>[...]
>>Nonetheless, I was unable to find any documentation about such a
>>different behaviour between Pysqlite and Pysqlite2; from my beginner
>>point of view the Pysqlite (Magnus' version) paramstyle looks a better
>>and more pythonic choice and I d
Vittorio wrote:
> [...]
> Nonetheless, I was unable to find any documentation about such a
> different behaviour between Pysqlite and Pysqlite2; from my beginner
> point of view the Pysqlite (Magnus' version) paramstyle looks a better
> and more pythonic choice and I don't grasp the Pysqlite2 de
Magnus Lycka <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]:
Thank you for your message I found really illuminating.
> Using the same symbol for both string substitutions and SQL placeholder
> such as pysqlite 1 and the MySQL interface does, is not really a bright
> idea in my opinion. Who
Vittorio wrote:
> Nonetheless, I was unable to find any documentation about such a
> different behaviour between Pysqlite and Pysqlite2; from my beginner
> point of view the Pysqlite (Magnus' version) paramstyle looks a better
> and more pythonic choice and I don't grasp the Pysqlite2 developers
Steve Holden <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> No, you actually did quite a creditable piece of debugging. The DB-API
> specifications allow database modules to substitute parameters into
> SQL commands in a number of different ways, and they are supposed to
> indicate the t
Vittorio wrote:
> I am reading "Beginning Python from Novice to Professional" and the book
> is really awesome. Nonetheless on ch 13 "Database Support" I found this
> code to import data (in a txt file) into a SQLite Database:
>
> #this was corrected because original "import sqlite" does not wor
I am reading "Beginning Python from Novice to Professional" and the book
is really awesome. Nonetheless on ch 13 "Database Support" I found this
code to import data (in a txt file) into a SQLite Database:
#this was corrected because original "import sqlite" does not work
from pysqlite2 import db
10 matches
Mail list logo