Locking SQL database for single user only

Phil Longstaff plongstaff at rogers.com
Mon Sep 20 14:50:24 EDT 2010


My thoughts on why single data field would be OK are that I wasn't sure what 
values (username? hostname? current time? other?) would be desired or easily 
available on which platforms.  A single field allows you to put multiple values 
in separated by some delimiter if desired.  If we know what fields we would want 
and how to get them on all platforms, I can easily use multiple fields.

 Phil
---------
I used to be a hypochondriac AND a kleptomaniac. So I took something for it.




________________________________
From: Derek Atkins <warlord at MIT.EDU>
To: Christian Stimming <stimming at tuhh.de>
Cc: Phil Longstaff <plongstaff at rogers.com>; Gnucash Devel Mailing List 
<gnucash-devel at gnucash.org>
Sent: Mon, September 20, 2010 2:32:09 PM
Subject: Re: Locking SQL database for single user only

Christian Stimming <stimming at tuhh.de> writes:

> Zitat von Phil Longstaff <plongstaff at rogers.com>:
>
>> For locking purposes, I think I will add an "accessors" table with 1
>> 2048-char field.  For single user mode, this must have at most 1 row in
>> the table.  For multi-user mode (in the future), this can keep track of
>> which users are currently logged in.  The big char field can encode user
>> name, machine, login time, whatever is wanted.
>
> Sounds fine.
>
> However, if that "accessors" table should really contain the
> information about who is currently accessing the database, I would
> definitely prefer distinct data fields over one big char field that
> would need to be parsed again (e.g. for translations). On the other
> hand, the additional columns can probably be added later once it
> becomes clear which ones are useful.

Also useful in order to display the "Open Anyways" in order to, e.g.,
overwrite the entry from a crashed application.

> Regards,
>
> Christian

-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