diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-06-01 16:36:21 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-06-01 16:36:21 +1000 |
commit | 5a39817212aa34ef181e9ed72851b077ba088260 (patch) | |
tree | 5c33a3cf7e4ddfe7ab5c244de001458ba27d2372 /source4/lib/ldb/include/ldb.h | |
parent | ae1c2415e23b56db7ffb8dc96425a8588401b03d (diff) | |
download | samba-5a39817212aa34ef181e9ed72851b077ba088260.tar.gz samba-5a39817212aa34ef181e9ed72851b077ba088260.tar.bz2 samba-5a39817212aa34ef181e9ed72851b077ba088260.zip |
added support for unique indexing in ldb
When a attribute is marked as LDB_ATTR_FLAG_UNIQUE_INDEX then attempts
to add a 2nd record that has the same attribute value for this
attribute as another record will fail.
This provides a much more efficient mechanism for ensuring that
attributes like objectGUID are unique
Diffstat (limited to 'source4/lib/ldb/include/ldb.h')
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 1b6b41aa43..8e4e2e0db3 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -375,6 +375,12 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c */ #define LDB_ATTR_FLAG_FIXED (1<<2) +/* + when this is set, attempts to create two records which have the same + value for this attribute will return LDB_ERR_ENTRY_ALREADY_EXISTS + */ +#define LDB_ATTR_FLAG_UNIQUE_INDEX (1<<3) + /** LDAP attribute syntax for a DN |