On Wed, 2001-11-14 at 20:06, Matthew Vanecek wrote: > I'll give that a whirl. You don't have any > documentation on the test-db.c, do you? any little > notes about it? Sometimes that's easier than trying > to divine the process flow from the code...
Nothing other than what's there. There basic
paradigm is: make a bunch of random, but valid,
gnucash data, save it to sql, load it back and
make sure it's the same, lather, rinse, repeat.
> I made a small change to kvp-sql.c in CPY_KVP(TYPE). I
> added the objtype in the following bit:
>
> p = stpcpy (p, "' as sessionGuid, datetime('NOW')
> as date_changed, " \
> "'d' as change, 'z' as objtype, *
> from gncKVPValue" TYPE " WHERE iguid=");\
>
>
> I picked 'z' as an arbitrary value--ideally it should
> come from the objtype of the object being removed. I
> hadn't quite figured out how to get that yet, but I'll
> read the code some more. Any hints would be
> appreciated, though...
I think the object type should be 'k' for kvp.
But check src/backend/postgres/kvp-sql.c to be
sure.
> think the sql backend would be more-or-less OK if that
> were implemented. Of course, I still need to find the
> best way to get the objtype field, to correctly note
> the type of transaction being deleted.
I think there are probably still some more issues
there, especially with escaping kvp data. You might
look at the diffs over the last month or so in the
postgres module.
> I noticed that the src/engine/sql directory is empty
> in the cvs head tree. Is all that stuff moved to the
> src/backend/postresql directory?
Yes.
dave
msg01438/pgp00000.pgp
Description: PGP signature
