sqlite file format, anyone?

Derek Atkins warlord at MIT.EDU
Sat Jun 21 12:00:38 CDT 2003


linas at linas.org (Linas Vepstas) writes:

> > I'd rather use embedded-mysql. 
> 
> One very minor comment: the chances of data corruption increase slightly
> for embedded sql-anything.  If the app has any stray pointers, there's
> a larger chance that they'll point into a data area.  I sense that this 
> is low, but I feel strangely compelled to talk about it :-(

Sure, but stray pointers can cause lots of other grief, too..
I don't want to worry about that.

> > Having to write
> > all the code to sql-ize and de-sqlize all the gnucash objects is
> > a PitA -- mysql gives you tools to help.
> 
> Do you have a URL where I can read about that?  I was hoping to put 
> an object generic SQL-ization into qof.
> 
> > SQL generation functions (and maybe even query-response parsing
> > routines, but that might be harder).
> 
> Huh? 

Basically, generic sql-generation function:
         gchar * gncFooMakeSQL(Foo*)
is relatively easy to make.  OTOH, going the other way is hard,
because each SQL engine provides the data in different formats.
Unless you can make some assumptions about what you're actually
getting from the SQL engine.  Can you assume the availability of
a const char *[]?  I'm not convinced you can...  If you COULD then
you could create a:
        Foo * gncFooMakeFromSQL(GNCBook*, const char*[])
however I do not believe that this is a valid assumption.

> --linas
> 
> p.s. I have a strong urge to rename everything in the QOF module into
> a consistent naming convention. I have an exactly counterbalancing sense
> that this is a waste of time.  Comments?

Do you ever expect an application to link against GnuCash *AND* QOF
at the same time?  What about an application linking against GnuCash
and another library built with QOF?

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list