Database code
Andrew Tridgell
tridge at linuxcare.com
Wed Dec 29 05:41:06 GMT 1999
> can your database code provide the following functionality:
>
> - two unique, primary keys
>
> - atomic addition of entries
yes and yes
to do the former you need to do this for a store:
- lock database (tdb_writelock())
- tdb_store() the record for the secondary key mapping it to the primary key
- tdb_store() the main record
- unlock database (tdb_writeunlock())
I don't want to build in multi-key directly to tdb as I want tdb to
stay really simple, instead use the above simple wrapper to do
multi-key.
More information about the samba-technical
mailing list