GC, QOF and queries
Daniel Espinosa
esodan at gmail.com
Fri Nov 3 17:56:46 EST 2006
2006/11/3, Phil Longstaff <plongstaff at rogers.com>:
> On Fri, 2006-03-11 at 17:00 -0500, Derek Atkins wrote:
> > I think, Phil, that you should use Daniel as a resource to better
> > understand GDA. Daniel, I think you should provide your GDA knowledge
> > to Phil who seems to better understand the issue at hand. I leave it
> > to you two to figure out how to best work together.
> >
Of course I just want to help!
> > Phil, you might want to try to model the GDA backend similar to the
> > File Backend where you can add plugins that supply additional tables
> > or callbacks. Also, you probably wants a "settings" table where you
> > can keep things like DB Schema version, etc.
>
> What I'm doing is basically what the file backend does. Each qof object
> type registers a backend handler using qof_object_register_backend().
> Then, when I want to run on query on a certain object type or commit an
> object, I find the corresponding backend handler and call its load or
> commit routine. The file backend only does this for business-related
> objects, but I'm doing it for all objects.
Could you post some of your work directly to me and may I can send you
some comments and some work I have.
I'll try to understand the QOF on the way, and after implement this
backend, may I have the enough knowleage to contribute in other areas.
>
> > Finally, when designing the schema you should keep in mind that we probably
> > want an audit table so we can look back at who changed what (and maybe even
> > when). Also, in the DB we probably want a 'last updated' column on each
> > primary table so we can easily keep track of when changes were made.. This
> > would be useful for multi-user cache coherency.
>
> I know the postgres backend has something like an audit table. I'll
> think about how that could be handled. Last updated column is probably
> pretty straightforward too.
>
It could be made through the commit sequence. In PostgreSQL and MySQL
you can trigger a function that save the changes in an audit table (I
do that actualy in my DB in PostgreSQL).
--
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los
cuates: LIBRE)
More information about the gnucash-devel
mailing list