On 10/26/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 26, 2007 at 06:38:26PM +0200, Bart wrote:
> > My question is another one - since by default SQLObject uses VARCHAR
> > to support BLOBCol and PickleCol on SQLite, it's not likely to use its
> > specifc BLOB API.
>
>    We simply cannot - SQLObject is written in pure Python, and use DB API
> drivers, PySQLite in this case.

> > It looks like pysqlite is up to using it, so the
> > real question seems to be whether SQLObject can be made to use it,
>
>    Is there any documentation for the API in PySQLite?


You don't need to go down to C, it seems pysqlite seems to use it
(strictly making it a superset of the DB-API). That is to say, the
insertion lines in the following:
http://www.initd.org/tracker/pysqlite/wiki/SnippetsBlobs
...works for me when I hand it 500MB of data.

It looks like the use of pysqlite2.Binary encases the data in a buffer
object, and that pysqlite uses the buffer type to decide to use the
blob api (not entirely sure, but the pysqlite usage guide seems to
hint at this).


But that is also the thing that had and has me confused - there are
mentions of pysqlite.Binary in SQLObject's SQLite code, which is why I
figured I was just missing something and not using SQLObject
correctly, and the other option is that SQLObject has some catch-all
code that means it acually doesn't. Or maybe someone never finished
the feature.

I'm having a hard time digging though the code to make sure, though,
since pysqlite and SQLObject are by design fairly automagical with a
good bunch of wrapping and aliasing - plus I remember pysqlite's
adapters seemed overly complex a system back when I looked at them.

(There are also other details, like that sqlite's duck typing seems to
extends into the string/blob distinction, so the schema only matters
so much -- though it would make sense to use BLOB in the schema for
SQLObject to know when to use this specific blobbing)


...but you can probably answer all that a lot better:)


Looking forward to where this goes,
--Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to