sqlite file format, anyone?

Linas Vepstas linas at linas.org
Sun Jun 22 14:41:34 CDT 2003


On Sun, Jun 22, 2003 at 12:29:36PM -0400, Derek Atkins was heard to remark:
> linas at linas.org (Linas Vepstas) writes:
> 
> > If you add
> > setters to gncobject, then I think you just might be able to do things
> > in a completely generic fashion.  
> 
> This already exists..   Take a look at gncObjectRegisterBackend().
> That interface allows you to register each object for each backend
> it supports.  Each backend defined a "gncobject plugin api", and each
> object that wants support in that backend implements that api and
> registers with gncobject for that backend.

OK, what I was thinking of was more along the lines of having something like:

static LoadObjectDef setters[] = {
    { ACCOUNT_NAME_, LOAD_STRING, (Setter)xaccAccountSetName },
    { ACCOUNT_DESCRIPTION_, LOAD_STRING, (Setter)xaccAccountSetDescription },
    { ACCOUNT_NOTES_, LOAD_STRING, (Setter)xaccAccountSetNotes },
};

so that one could write a routine that automatically loops over all of these
and for every field in an SQL table, called the corresponding setter.
In other words, a generic object fetcher. 

> Perhaps I should re-kindle the RPC Backend ;)

I'm not sure I understand. (I'm not sure I want to). Aren't you just 
pushing the problem to a different place?  If one client deleted a 
split, another client that's still holding the old split needs to be 
able to figure out that it's copy is old, and, at some point, trash 
it as well.  You shouldn't have to move megabytes of data across a 
wire just to delete one split.

--linas

-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas at linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933


More information about the gnucash-devel mailing list