I presume you are not meaning that a single connection cannot be used
for more than one interaction when they are sequential, right? That
would be disastrous (read "the database wrapper is simply broken"). You
could probably just assign None to the connection attribute in the
django.db.backend class, since creating a cursor will create a new
connection if necessary, but that's not going to be something we ever
exposed.
However, SQLite also has the issue that you cannot have partially read
data from a select statement in a cursor and then call an update on the
same connection. Ticket #7411 was one way this appeared and it's not
been fixed.
The way to avoid the problem is to use the can_use_chunked_reads
attribute in the DatabaseFeatures class. Have a look at the use of this
in django/db/backends/sqlite/base.py. Most databases can happily
multiplex cursor interactions (often because they are already pulling
all the data over to the client side on their own), so we read data from
the cursor in chunks, but for SQLite we ensure all the data is read at
once.
Regards,
Malcolm
Ticket #7411 was one way this appeared and it's not
been fixed.
Yes, indeed. That's the second time I've made that typo this
afternoon. :-(
#7411 has indeed been fixed. I fixed it.
Malcolm
>
>
> Yes, indeed. That's the second time I've made that typo this
> afternoon. :-(
>
> #7411 has indeed been fixed. I fixed it.
>
I posted a comment on issue #7 of the django-pyodbc project
pointing in the same direction:
http://code.google.com/p/django-pyodbc/issues/detail?id=7#c2
Because I suspect both issue #6 Ulf opened and issue #7 are
caused by the same limitation of the MS ODBC driver for SQL Server.
Regards,
--
Ramiro Morales