[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6561) Add-if-not-present

Full_Name: Pierangelo Masarati
Version: HEAD
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (
Submitted by: ando

I need to implement a modify operation whose semantics is "add if not
present", an add that only takes place if that attribute is not yet
present in the entry.

I need it as an internal operation, so right now I wouldn't bother
formalizing it as an extension of the semantics of the modify operation. 
Something like the SLAP_MOD_SOFTADD, which in turn consists in adding an
attribute value only if that value is not already present.

See <http://www.openldap.org/lists/openldap-devel/201005/msg00000.html> for

I have introduced a SLAP_MOD_ADD_IF_NOT_PRESENT flag and added code to support
it in back-bdb/hdb.  It works as intended.  I plan to extend its support to all
backends and overlays.