design documents?

Derek Atkins warlord at MIT.EDU
Sat Mar 29 12:11:21 EDT 2008


I would look in src/import-export/log-replay/

If there's no old transaction then the input is either NULL or
empty and the log outputs a 'create'.

-derek

Quoting Ross Boylan <RossBoylan at stanfordalumni.org>:

>
> On Sat, 2008-03-29 at 08:54 -0700, Ross Boylan wrote:
>> On Sat, 2008-03-29 at 11:40 -0400, Derek Atkins wrote:
>> > I'm afraid that really there are no good design docs.  Certainly
>> > nothing coherent.  Many times there are email discussions when a
>> > feature is being created, but nothing really gets put down for
>> > posterity in the source tree.  Unfortunately I have to say the
>> > the design doc is the source code.
>> >
>> > -derek
>> Could anyone point me to where I can start to understand the log file
>> format?  As I said, my main interest is in effecting a repair, possibly
>> by using excerpts from a previous log file.
>>
>> It looks as if the documentation has moved mostly to doxygen, and I've
>> discovered http://svn.gnucash.org/docs/HEAD/index.html.  However, the
>> discussion of backup says "The actual file writing is done by
>> xaccWriteAccountGroupFile() in in src/engine/FileIOP.hv" and that file
>> doesn't seem to exist (nor does a search on doxygen turn up the
>> function).
> I found this:
>
> void
> xaccTransWriteLog
> (
> Transaction *
> trans,
>
>
> char
> flag
>
>
> )
>
>
>
> Parameters:
>
>        trans
>        The transaction to
>        write out to the log
>
>        flag
>        The engine currently
>        uses the log
>        mechanism with flag
>        char set as follows:
>        'B' for 'begin
>        edit' (followed by
>        the transaction as it
>        looks before any
>        changes, i.e. the
>        'old value') 'D' for
>        delete (i.e. delete
>        the previous B;
>        echoes the data in
>        the 'old B') 'C' for
>        commit (i.e. accept a
>        previous B; data that
>        follows is the 'new
>        value') 'R' for
>        rollback (i.e. revert
>        to previous B; data
>        that follows should
>        be identical to old
>        B)
>
> So what if I have a new transaction, i.e., there is no old value?
>



-- 
       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