Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Put struct definitions in header

  • Loading branch information...
commit a93e643cffe35b3d7b1032df1a6323c93d31dd40 1 parent 7f34eb0
@orlandov authored
Showing with 33 additions and 29 deletions.
  1. +1 −29 src/statement.cc
  2. +32 −0 src/statement.h
View
30 src/statement.cc
@@ -17,7 +17,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <string.h>
extern "C" {
-#include <mpool.h>
+ #include <mpool.h>
};
#include "database.h"
@@ -725,34 +725,6 @@ Handle<Value> Statement::Step(const Arguments& args) {
return Undefined();
}
-// Results will stored in a multi-dimensional linked list.
-// That is, a linked list (rows) of linked lists (row values)
-// Results are composed of rows. Rows are composed of cells.
-struct cell_node {
- void *value;
- int type;
- struct cell_node *next;
-};
-
-struct row_node {
- struct cell_node *cells;
- struct row_node *next;
-};
-
-struct fetchall_request {
- Persistent<Function> cb;
- Statement *sto;
- mpool_t *pool;
- char *error;
- struct row_node *rows;
-};
-
-// represent strings with this struct
-struct string_t {
- size_t bytes;
- char data[];
-};
-
int Statement::EIO_AfterFetchAll(eio_req *req) {
HandleScope scope;
ev_unref(EV_DEFAULT_UC);
View
32 src/statement.h
@@ -23,6 +23,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sqlite3.h>
#include <stdlib.h>
+extern "C" {
+ #include <mpool.h>
+};
+
using namespace v8;
using namespace node;
@@ -124,4 +128,32 @@ struct bind_pair {
size_t value_size;
};
+// Results will stored in a multi-dimensional linked list.
+// That is, a linked list (rows) of linked lists (row values)
+// Results are composed of rows. Rows are composed of cells.
+struct cell_node {
+ void *value;
+ int type;
+ struct cell_node *next;
+};
+
+struct row_node {
+ struct cell_node *cells;
+ struct row_node *next;
+};
+
+struct fetchall_request {
+ Persistent<Function> cb;
+ Statement *sto;
+ mpool_t *pool;
+ char *error;
+ struct row_node *rows;
+};
+
+// represent strings with this struct
+struct string_t {
+ size_t bytes;
+ char data[];
+};
+
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.