kyamagu / matlab-bdb

Persistent key-value storage for matlab.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can the api be used to configure db with duplicate key records enabled?

bourdalas opened this issue · comments

@bourdalas Probably no. Although multiple put flag exists in the api, cursor does not support read functionality. Use LMDB if you need alternative DB.

@kyamagu Hi, thanks for replying so quickly. I managed to configure the db by modifing the open function and adding "database_->set_flags" in order to enable the DB_DUP flag, in order to store the duplicate key records.

i also wanted to ask if i can bypass the following error occuring when using the multiple flag on both put and get functions.

Error using libbdb
MxArray is not a scalar.

Error in bdb.get (line 60)
value = libbdb(mfilename, varargin{:});

Error in searchReference (line 18)
keyOut = bdb.get(excerptkeys(i,:),'Multiple',true);

Thanks again

@bourdalas You can look for where C++ types and Matlab type (MxArray) are converted. Probably a vector is converted to C++ primitives such as int or double