Ed Leafe wrote:
On Nov 3, 2005, at 6:39 PM, Paul McNett wrote:

What if our db wrapper threw the results into an embedded in-memory sqlite database, from which you can run these local queries?


I thought about that, but there are several downsides. First, now SQLite will have to be yet another installation requirement to use Dabo. Not a showstopper, but not ideal. Second, and much more important, is the problem of preserving type. The dbapi interface modules handle the conversion of backend types into Python and back, but if you start throwing SQLite into the mix, where everything is a string, and then have to manage the conversion of every value back to the original type... it just seems like that would be a ton of work. That would also require testing and changes every time a new database is added to the Dabo family, since each db has its own data type issues. Third, we'd now have to start doing something like Fox does with temp cursors: create their filesystem counterparts in the user's temp directory, and manage cleaning them up when the cursor is closed.

Everything in sqlite storage is a string, but it doesn't get exposed to Python that way does it? IOW, if I do a:

CREATE TABLE customers (id int, companyname char(64), creditlimit decimal(10,2))

...The fact that those "types" get stored in the db as strings doesn't get in the way of the fact that in Python they come from the dbapi as int, string, and decimal. At least that's the way I understand it - I haven't actually tried it.

Sure, we may have to create/remove temp files, but that is no big deal. There's a whole python module for managing such things for you.

Regarding the installation requirement, that's just par for the course. Things are required. When we package Dabo, we can package sqlite with it. We just haven't gotten to the point yet of thinking about packaging issues.

--
Paul McNett
http://paulmcnett.com
http://dabodev.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to