1 #include "bdb_query.hpp"
2 #include "log/bdb_database.hpp"
4 namespace swarm {
namespace query {
8 gpulog::logrecord allocateLogrecord(
const int len){
9 char* data =
new char[len];
13 gpulog::logrecord lr(data);
18 DbEnv* env(bdb_database::createDefaultEnv());bdb_database db(env);
19 db.openForReading(dbfile);
21 Pprimary_cursor_t cur = db.primary_cursor();
23 pkey_t key(T.first,0,0);
26 bool has_record = cur->position_at(key,lrw);
27 while(has_record && key.time <= T.last){
30 gpulog::logrecord lr = lrw.lr();
33 has_record = cur->next(key,lrw);