On Sun Oct 2 2011 Eric Abrahamsen wrote:
> Can you drop any hints about how it will change? Extra arguments?

I didn't want to do anything fancy. Yet if the field argument
doesn't match anything what it is supposed to match now, the new
code also tries to match the keys of individual note fields. So if
the value of field is 'note, it returns a list of all note fields.
If the value is 'notes, it returns the value of the 'notes field.

Other ideas are welcome.

I just realized one thing: This function used to throw an error if
the field arg had an `illegal' value. That made sense for the old
scheme where the allowed values were well-defined for every record
(though possibly the value was nil). With the new scheme it's
probably better to simply return nil if field does not exist.

> Just to confirm: address and phone fields can have multiple
> identical string keys, but note-type fields can't, is that right?

Yes. All this is partly historical, partly it is motivated by
efficiency / transparency. All in all, BBDB uses individual note
fields in more ways than individual address and phone fields. So it
helps if the note fields can be accessed efficiently and if there is no
need to worry about mutliple fields with the same key. BBDB doesn't
do similar things with individual addresses or phone numbers. Yet
for the few things that BBDB can do with addresses and phone
numbers, it turned out to be less a problem to allow keys to occur
multiple times. (Address and phone "keys" like "home" or "work" are
really not used at all like keys. That's why this works.)

Roland

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to