Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
a93e643c
Commit
a93e643c
authored
Sep 08, 2010
by
Orlando Vazquez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put struct definitions in header
parent
7f34eb06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
29 deletions
+33
-29
statement.cc
src/statement.cc
+1
-29
statement.h
src/statement.h
+32
-0
No files found.
src/statement.cc
View file @
a93e643c
...
@@ -17,7 +17,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -17,7 +17,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <string.h>
#include <string.h>
extern
"C"
{
extern
"C"
{
#include <mpool.h>
#include <mpool.h>
};
};
#include "database.h"
#include "database.h"
...
@@ -725,34 +725,6 @@ Handle<Value> Statement::Step(const Arguments& args) {
...
@@ -725,34 +725,6 @@ Handle<Value> Statement::Step(const Arguments& args) {
return
Undefined
();
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
)
{
int
Statement
::
EIO_AfterFetchAll
(
eio_req
*
req
)
{
HandleScope
scope
;
HandleScope
scope
;
ev_unref
(
EV_DEFAULT_UC
);
ev_unref
(
EV_DEFAULT_UC
);
...
...
src/statement.h
View file @
a93e643c
...
@@ -23,6 +23,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
...
@@ -23,6 +23,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <sqlite3.h>
#include <sqlite3.h>
#include <stdlib.h>
#include <stdlib.h>
extern
"C"
{
#include <mpool.h>
};
using
namespace
v8
;
using
namespace
v8
;
using
namespace
node
;
using
namespace
node
;
...
@@ -124,4 +128,32 @@ struct bind_pair {
...
@@ -124,4 +128,32 @@ struct bind_pair {
size_t
value_size
;
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
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment