Klaus Nowikow | 16 Apr 14:41

Mozilla Storage backend

Hi!

I'd like to try and see if I can implement a backend using the Mozilla
Storage subsystem [1], to be used with the PyXPCOM [3] extension.

The Storage subsystem is just an XPCOM [2] wrapper for SQLite, so this 
should be relatively easy to do by borrowing code from the SQLite
backend.

Anyway, are there any pointers to documentation on how to implement
such backends, and especially what potential problems I have to take
into consideration?

Best regards,
Klaus

References:
[1] http://developer.mozilla.org/en/docs/Storage
[2] http://developer.mozilla.org/en/docs/XPCOM
[3] http://developer.mozilla.org/en/docs/PyXPCOM

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Oleg Broytmann | 16 Apr 14:50
X-Face

Re: Mozilla Storage backend

On Wed, Apr 16, 2008 at 02:41:48PM +0200, Klaus Nowikow wrote:
> Anyway, are there any pointers to documentation on how to implement
> such backends

   There is no, but you can look at at the code implemented SQLite,
PostgreSQL and MySQL backends (the most elaborated backends in SQLObject)
and see the methods (and their signatures) they override (from
DBConnection) to implement backend-specific features.
   Look also at converters.py - there is some backend-specific code, too.

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Klaus Nowikow | 16 Apr 15:03

Re: Mozilla Storage backend

Oleg Broytmann wrote:
> On Wed, Apr 16, 2008 at 02:41:48PM +0200, Klaus Nowikow wrote:
>> Anyway, are there any pointers to documentation on how to implement
>> such backends
> 
>    There is no, but you can look at at the code implemented SQLite,
> PostgreSQL and MySQL backends (the most elaborated backends in SQLObject)
> and see the methods (and their signatures) they override (from
> DBConnection) to implement backend-specific features.
>    Look also at converters.py - there is some backend-specific code, too.

I'll have a look at it, thank you.

--
Klaus

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Oleg Broytmann | 16 Apr 15:39
X-Face

Re: Mozilla Storage backend

On Wed, Apr 16, 2008 at 04:50:43PM +0400, Oleg Broytmann wrote:
> On Wed, Apr 16, 2008 at 02:41:48PM +0200, Klaus Nowikow wrote:
> > Anyway, are there any pointers to documentation on how to implement
> > such backends
> 
>    There is no, but you can look at at the code implemented SQLite,
> PostgreSQL and MySQL backends (the most elaborated backends in SQLObject)
> and see the methods (and their signatures) they override (from
> DBConnection) to implement backend-specific features.
>    Look also at converters.py - there is some backend-specific code, too.

   SQLObject is oriented towards using Python DB API: connection => cursor
=> execute => fetch, so if Mozilla doesn't expose a connection to SQLite
you will need to override more methods.

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane