berkeley-db

Problem with Berkeley DB and C++

一个人想着一个人 提交于 2019-12-13 03:39:32
问题 I'm trying to write a simple C++ program that uses Berkeley DB for storage. The key of the database is of type time_t and the data is an integer . I need to take the difference between two adjacent data in a between two key. I open a cursor with the flag DB_SET_RANGE and then i use DB_NEXT to iterate. My problem is that the cursor returns unsorted data. Is there a way to specify a custom sorter function for the cursor? 回答1: Some of the reasons why you may want to provide a custom sorting

Use integer keys in Berkeley DB with python (using bsddb3)

戏子无情 提交于 2019-12-12 06:30:33
问题 I want to use BDB as a time-series data store, and planning to use the microseconds since epoch as the key values. I am using BTREE as the data store type. However, when I try to store integer keys, bsddb3 gives an error saying TypeError: Integer keys only allowed for Recno and Queue DB's . What is the best workaround? I can store them as strings, but that probably will make it unnecessarily slower. Given BDB itself can handle any kind of data, why is there a restriction? can I sorta hack the

Berkeley DB(Unable to Locate Component)

假装没事ソ 提交于 2019-12-12 01:30:01
问题 I have a problem with berkeley DB. I get a dialog titled "Unable To Locate Componenent" saying "This application has failed to start because libdb48.dll was not found. Re-installing the application may fix this problem", then it crashes after clicking ok. I got the error message when running these simple code below: #include <iostream> #include <string> #include <db_cxx.h> using namespace std; int main() { Db db(0, 0); } I already set the Additional include directories to the "build_windows"

How to read Perl DB_Files in Ruby

霸气de小男生 提交于 2019-12-11 12:55:33
问题 I'm migrating a Perl script to Ruby. The Perl script uses DB_File in DB_HASH mode. How do I read all the keys and values from such a file in Ruby? 回答1: I finally realized that DB_HASH is a Berkeley DB file format. I didn't have libdb for Ruby on my Ubuntu box but that was fixed with a simple apt-get apt-get install libdb4.2-ruby1.8 Then in Ruby require 'bdb' db=BDB::Hash.open("test.db") keyvalues=db.to_hash 来源: https://stackoverflow.com/questions/2214838/how-to-read-perl-db-files-in-ruby

Use CPAN BerkeleyDB module on Windows 7 (64 bit)

孤街醉人 提交于 2019-12-11 07:27:39
问题 I have been trying to install the BerkeleyDB CPAN module on my Windows 7 (x86_64) PC without any luck (BerkeleyDB::Hash is what I need). I have 64 bit ActivePerl and Oracle Berkeley DB 11gR2 5.3.15 installed. First I tried installing using the command : *cpan install BerkeleyDB* This came back with the error: *It looks like the installation of dmake and MinGW has failed. You will not be able to run Makefile commands or compile C extension code. Please check your internet connection and your

berkeley DB: can't compile c++ codes

为君一笑 提交于 2019-12-11 03:35:02
问题 When I compiled the sample codes of C++, I got following info: c++ excxx_example_database_read.cpp -o dbApp -I /usr/local/BerkeleyDB.5.0/include/ Undefined symbols: "Dbt::Dbt(void*, unsigned int)", referenced from: show_vendor(MyDb&, char const*)in ccnaWItX.o show_item(MyDb&, MyDb&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)in ccnaWItX.o "Dbc::get(Dbt*, Dbt*, unsigned int)", referenced from: show_all_records(MyDb&, MyDb&) in ccnaWItX.o show_item(MyDb&, MyDb&, std

Titan loading problems with elastic search

雨燕双飞 提交于 2019-12-10 23:17:57
问题 I'm using the following code to load Titan: TitanFactory.Builder config = TitanFactory.build(); config.set("storage.backend", "berkeleyje"); config.set("storage.directory", DIRECTORY); //config.set("storage.conf-file", "file:////" + DIRECTORY + "/cassandra/cassandra.yaml"); config.set("index." + INDEX_NAME + ".backend", "elasticsearch"); config.set("index." + INDEX_NAME + ".DIRECTORY", DIRECTORY + File.separator + "es"); config.set("index." + INDEX_NAME + ".elasticsearch.local-mode", true);

How do i dump a specific subversion path from a berkeley db?

时间秒杀一切 提交于 2019-12-10 10:49:29
问题 I'm trying to migrate one specific branch from a windows subversion berkeley db installation, however I cant seem to be able to work out how to pass a "path" to it as its a db structure and not a flat file system. Can anyone give me any pointers, with preferably an example? Thanks 回答1: svnadmin dump [PATH_TO_REPO] | svndumpfilter include [PATH_OF_BRANCH] > output.dmp svnadmin create [PATH_TO_NEW_REPO] svnadmin load [PATH_TO_NEW_REPO] < output.dmp Remarks: [PATH_TO_REPO] and [PATH_TO_NEW_REPO]

How can I use the Berkeley DB within an iOS application?

纵然是瞬间 提交于 2019-12-09 18:58:47
问题 I would like to use the Berkeley DB within an iOS application, but I'm not sure how to go about this. How do you integrate the Berkeley DB within an iOS project? How do you communicate with it via Objective-C? Are there any tutorials or examples out there that might demonstrate how to do this? 回答1: The first thing to note is that the library is C++, not objective-c. This isn't an issue since objective-c can call C++. Also, there isn't much in the way of tutorials, but here is what you will

Best Python module for Berkeley DB? [closed]

↘锁芯ラ 提交于 2019-12-09 04:42:33
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . According to the Python 2.6.5 docs [1], the bsddb module has been deprecated for removal in Python 3.0. What module/wrapper should I be using instead? [1] http://docs.python.org/library/bsddb.html 回答1: I recommend pyBSDdb (from which the version currently in Python standard's library was taken -- but the stand