GUIDs (was Re: SQL backend for GnuCash 2)
Phil Longstaff
plongstaff at rogers.com
Sat Oct 28 12:17:29 EDT 2006
On Sat, 2006-28-10 at 11:46 -0400, Derek Atkins wrote:
> Phil Longstaff <plongstaff at rogers.com> writes:
>
> >> > Since the connection string will be db-specific, we may want a db core
> >> > built around libgda (see libgda vs libdbi e-mail) with a small add-on to
> >> > handle the connection string formatting and how guid's will be handled
> >> > (as well as adding db-specific indexes, stored procedures, ...).
> >>
> >> Hmm.. I dont know how that might work.. But maybe that's because I
> >> don't know GDA well enough.
> >
> > Well, with libgda, you can make a connection in 2 ways. The first is to
> > call an API and pass a pre-defined dataset name (dsn) which contains the
> > provider name, connection string, and other info needed. This
> > predefined dsn is a section in ~/.libgda/config. The other way is to
> > call a different API and pass the provider name and connection string.
> > The connection strings are similar but will contain different info. An
> > sqlite connection string should contain a file name, while a mysql or
> > pgsql string should contain a host name, port number and database name.
>
> Sorry, what I meant was that I didn't understand what you meant by
> "small add-on".. I don't know GDA well-enough to know what that means
> or how that would work.
>
> > Phil
I haven't thought this through entirely, but these are my first
thoughts. In order to specify the provider, we'll need the data URL to
be sqlite://... or mysql://... or ... The current backend architecture
is already plugin. Therefore, if I build a core backend built around
libgda, then small wrapper backends for each sql db type, the core
libgda piece can handle most of the heavy lifting, and the wrappers can
adjust things as required (connection string, data type
differences, ...).
Phil
More information about the gnucash-devel
mailing list