-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbdb_db.h
More file actions
50 lines (42 loc) · 1.64 KB
/
bdb_db.h
File metadata and controls
50 lines (42 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.
#ifndef BDB_DB_H_
#define BDB_DB_H_
#include "bdb_object.h"
class Db: public DbObject {
public:
Db();
virtual ~Db();
static void Initialize(v8::Handle<v8::Object> target);
static v8::Handle<v8::Value> AssociateS(const v8::Arguments &);
static v8::Handle<v8::Value> CloseS(const v8::Arguments &);
static v8::Handle<v8::Value> CursorGet(const v8::Arguments &);
static v8::Handle<v8::Value> CursorGetS(const v8::Arguments &);
static v8::Handle<v8::Value> Del(const v8::Arguments &);
static v8::Handle<v8::Value> DelS(const v8::Arguments &);
static v8::Handle<v8::Value> Get(const v8::Arguments &);
static v8::Handle<v8::Value> GetS(const v8::Arguments &);
static v8::Handle<v8::Value> New(const v8::Arguments &);
static v8::Handle<v8::Value> OpenS(const v8::Arguments &);
static v8::Handle<v8::Value> Put(const v8::Arguments &);
static v8::Handle<v8::Value> PutIf(const v8::Arguments &);
static v8::Handle<v8::Value> PutS(const v8::Arguments &);
static v8::Handle<v8::Value> SetEncrypt(const v8::Arguments &);
static v8::Handle<v8::Value> SetFlags(const v8::Arguments &);
static v8::Handle<v8::Value> Fd(const v8::Arguments &);
protected:
static int EIO_Get(eio_req *req);
static int EIO_AfterGet(eio_req *req);
static int EIO_CursorGet(eio_req *req);
static int EIO_AfterCursorGet(eio_req *req);
static int EIO_Put(eio_req *req);
static int EIO_PutIf(eio_req *req);
static int EIO_Del(eio_req *req);
private:
Db(const Db &rhs);
Db &operator=(const Db &rhs);
DB *_db;
DB_ENV *_env;
int _retries;
bool _transactional;
};
#endif // BDB_DB_H_