Skip Menu |

This queue is for tickets about the LMDB_File CPAN distribution.

Report information
The Basics
Id: 93239
Status: rejected
Priority: 0/
Queue: LMDB_File

People
Owner: Nobody in particular
Requestors: quanah.gibsonmount [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: associate function that takes callback to link databases
It would be useful to have an associate function like that which is found in the BerkeleyDB perl module to allow associations between two databases: http://search.cpan.org/~pmqs/BerkeleyDB-0.54/BerkeleyDB.pod $status = $db->associate($secondary, \&key_callback) Associate $db with the secondary DB $secondary New key/value pairs inserted to the database will be passed to the callback which must set its third argument to the secondary key to allow lookup. If an array reference is set multiple keys secondary keys will be associated with the primary database entry. Data may be retrieved fro the secondary database using db_pget to also obtain the primary key. Secondary databased are maintained automatically.
IMO, this should be a wishlist item. Personally I like that LMDB_File is more or less a straight interface to LMDB which (unlike BDB) doesn't try to shoe-horn everything into its distribution. Of course this functionality can be handled at a higher layer, maybe this is a good opportunity for you to create a CPAN module that does this? :) On Fri Feb 21 15:53:06 2014, MISHIKAL wrote: Show quoted text
> It would be useful to have an associate function like that which is > found in the BerkeleyDB perl module to allow associations between two > databases: > > http://search.cpan.org/~pmqs/BerkeleyDB-0.54/BerkeleyDB.pod > > $status = $db->associate($secondary, \&key_callback) > > Associate $db with the secondary DB $secondary > > New key/value pairs inserted to the database will be passed to the > callback which must set its third argument to the secondary key to > allow lookup. If an array reference is set multiple keys secondary > keys will be associated with the primary database entry. > > Data may be retrieved fro the secondary database using db_pget to also > obtain the primary key. > > Secondary databased are maintained automatically.
El Mié Ago 13 14:02:59 2014, FRACTAL escribió: Show quoted text
> IMO, this should be a wishlist item. > > Personally I like that LMDB_File is more or less a straight interface > to LMDB which (unlike BDB) doesn't try to shoe-horn everything into > its distribution. > > Of course this functionality can be handled at a higher layer, maybe > this is a good opportunity for you to create a CPAN module that does > this? :) >
Yes, that functionality belongs to a separate high level module.