On Mon, Oct 24, 2016 at 4:34 AM, Roland Winkler <wink...@gnu.org> wrote:

 This relates to one item that has been on my BBDB todo list
> for a long time: add uuid fields to each record so that BBDB can
> check more reliably whether two records are "equal".  Here uuid
> fields will come handy in a range of use cases, with multiple
> database files, but also, say when importing and exporting BBDB
> records from / to other databases.

ASynK does exactly that - add an xfield called 'bbdb-id' that holds a uuid.

So the uuid field should become a "compulsory" field (appearing in
> the "backbone" of each record).  This requires to change (once more)
> the internal format of BBDB records.  Then I was wondering: Are
> there other (unrelated) changes in BBDB's internal format of storing
> records that would be desirable?  Here I thought of the two xfields
> creation-date and timestamp.  For a long time, they have been
> implemented as xfields.  Yet it would be cleaner if they likewise
> became elements of the "backbone" of each BBDB records.

These two timestamp fields, along with uuid, are all required for making
sync work at all. As such I agree with your thinking here with regards to
these fields.

Note that the two timestamp fields were not present before BBDB v3. So the
extend of potential breakage in backwards compatibility is not that sever.

> Did anybody already try to implement / use a uuid field as xfield?
> I guess that when BBDB will upgrade itself to the new record format
> using "backbone" uuid fields, it should check whether the records
> already have such an xfield.

I did exactly that and even raised some patches to bbdb v3 back when Barak
Pearlmutter was more active on this list. I cannot remember the details any
more what happened to the patches I sent him, which can still be found on
this branch (search for my userid: skarra) :
You are free to use code from there, of course.

Note that ASynK just adds uuids when one is not found in the xfields. It
would just make it a more consistent experience if there was a standard way
to do this, that's all.

The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to