Browse Source

move the batons around

master
Brett Langdon 12 years ago
parent
commit
088a543ced
2 changed files with 45 additions and 44 deletions
  1. +0
    -44
      src/wgdb.cc
  2. +45
    -0
      src/wgdb.h

+ 0
- 44
src/wgdb.cc View File

@ -3,50 +3,6 @@
Persistent<Function> Record::constructor;
Persistent<Function> Cursor::constructor;
/*
*
* Structs
*
*/
struct Baton {
bool has_cb;
Persistent<Function> callback;
WgDB* wgdb;
const char* error;
void* data;
};
struct FieldData {
int field;
wg_int enc;
Record* record;
};
struct Fields {
int length;
wg_int* encs;
};
struct RecordData {
int length;
void* record;
};
struct FindData {
int field;
wg_int enc;
wg_int cond;
void* rec;
void* data;
};
struct CursorData {
int arglen;
wg_query_arg* arglist;
wg_query* query;
};
/*
*
* Async Functions


+ 45
- 0
src/wgdb.h View File

@ -64,4 +64,49 @@ class Cursor : ObjectWrap{
static void do_after_create_cursor(uv_work_t* req, int status);
};
struct Baton {
bool has_cb;
Persistent<Function> callback;
WgDB* wgdb;
const char* error;
void* data;
};
struct FieldData {
int field;
wg_int enc;
Record* record;
};
struct Fields {
int length;
wg_int* encs;
};
struct RecordData {
int length;
void* record;
};
struct FindData {
int field;
wg_int enc;
wg_int cond;
void* rec;
void* data;
};
struct CursorData {
int arglen;
wg_query_arg* arglist;
wg_query* query;
};
struct IndexData {
int reclen;
wg_int* matchrec;
int field;
};
#endif

Loading…
Cancel
Save