forked from dberesford/rocksdb-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrocksdb.cc
More file actions
23 lines (21 loc) · 653 Bytes
/
rocksdb.cc
File metadata and controls
23 lines (21 loc) · 653 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <nan.h>
#include <node.h>
#include "DBNode.h"
#include "Iterator.h"
#include "Snapshot.h"
#include "Batch.h"
#include "FileWriter.h"
#include "DBWithTTL.h"
void InitAll(v8::Local<v8::Object> exports, v8::Local<v8::Object> module) {
DBNode::Init();
Iterator::Init();
Snapshot::Init();
Batch::Init();
FileWriter::Init();
DBWithTTL::Init();
NODE_SET_METHOD(exports, "open", DBNode::NewInstance);
NODE_SET_METHOD(exports, "openDBWithTTL", DBWithTTL::NewInstance);
Nan::SetMethod(exports, "listColumnFamilies", DBNode::ListColumnFamilies);
Nan::SetMethod(exports, "destroyDB", DBNode::DestroyDB);
}
NODE_MODULE(addon, InitAll)