Re: uuid field [was: more than one BBDB file]
On Mon, Oct 24, 2016 at 4:34 AM, Roland Winkler 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) : https://github.com/barak/bbdb3/commits/uuid?after=wEoFQcQQ%2BvEkHMAiFsoVaKZRororMTc0 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. -Karra -- 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! http://sdm.link/telerik___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
Re: uuid field [was: more than one BBDB file]
"Roland Winkler" writes: > Currently BBDB supports only one such file. I'd like to extend > that. 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. That would be great to have, indeed. Single BBDB file is also the reason why I won’t go into ASynK route and stay with bbdb-vcard mechanism. > Here are a few thoughts about uuid fields, please comment: I’m too new with BBDB to be able to comment not being familiar with BBDB structure… > 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. That’s clear. > 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. No idea about that one. Sincerely, Gour -- One must deliver himself with the help of his mind, and not degrade himself. The mind is the friend of the conditioned soul, and his enemy as well. -- 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! http://sdm.link/telerik ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/
uuid field [was: more than one BBDB file]
On Sat Oct 22 2016 Saša Janiška wrote: > recently I did asked author of vdir.el to provide support for > using more than one repo vdir repo for the contacts since I manage > email accounts for my & my wife on the desktop while she is mostly > using mobile phone. > > So, I’m interested if there is possibility to have more than one > BBDB file - e.g. one for my contacts and another for my wife and > being able to switch between the two before invoking BBDB? Currently BBDB supports only one such file. I'd like to extend that. 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. Here are a few thoughts about uuid fields, please comment: I'd prefer not to make the uuid field another xfield because xfields are really intended for custom fields. If BBDB starts to use uuids, it would probably happen such that you could really screw up BBDB if you decided to delete these fields from your records (which is always possible with xfields). 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. 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. Roland -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/