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
0ed18f52
Commit
0ed18f52
authored
Jan 19, 2010
by
Eric Fredricksen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Node version v0.1.25-15-g4e16e38
parent
17e85536
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
README
README
+1
-1
sqlite3_bindings.cc
sqlite3_bindings.cc
+3
-3
No files found.
README
View file @
0ed18f52
...
@@ -8,6 +8,6 @@ The two files required to use these bindings are sqlite.js and
...
@@ -8,6 +8,6 @@ The two files required to use these bindings are sqlite.js and
build/default/sqlite3_bindings.node. Put this directory in your
build/default/sqlite3_bindings.node. Put this directory in your
NODE_PATH or copy those two files where you need them.
NODE_PATH or copy those two files where you need them.
Tested with Node version
0.1.1
8
Tested with Node version
v0.1.25-15-g4e16e3
8
(c) 2010 Eric Fredricksen - See permissive license terms at top of sqlite.js
(c) 2010 Eric Fredricksen - See permissive license terms at top of sqlite.js
sqlite3_bindings.cc
View file @
0ed18f52
...
@@ -142,7 +142,7 @@ protected:
...
@@ -142,7 +142,7 @@ protected:
static
int
CommitHook
(
void
*
v_this
)
{
static
int
CommitHook
(
void
*
v_this
)
{
HandleScope
scope
;
HandleScope
scope
;
Sqlite3Db
*
db
=
static_cast
<
Sqlite3Db
*>
(
v_this
);
Sqlite3Db
*
db
=
static_cast
<
Sqlite3Db
*>
(
v_this
);
db
->
Emit
(
"commit"
,
0
,
NULL
);
db
->
Emit
(
String
::
New
(
"commit"
)
,
0
,
NULL
);
// TODO: allow change in return value to convert to rollback...somehow
// TODO: allow change in return value to convert to rollback...somehow
return
0
;
return
0
;
}
}
...
@@ -150,7 +150,7 @@ protected:
...
@@ -150,7 +150,7 @@ protected:
static
void
RollbackHook
(
void
*
v_this
)
{
static
void
RollbackHook
(
void
*
v_this
)
{
HandleScope
scope
;
HandleScope
scope
;
Sqlite3Db
*
db
=
static_cast
<
Sqlite3Db
*>
(
v_this
);
Sqlite3Db
*
db
=
static_cast
<
Sqlite3Db
*>
(
v_this
);
db
->
Emit
(
"rollback"
,
0
,
NULL
);
db
->
Emit
(
String
::
New
(
"rollback"
)
,
0
,
NULL
);
}
}
static
void
UpdateHook
(
void
*
v_this
,
int
operation
,
const
char
*
database
,
static
void
UpdateHook
(
void
*
v_this
,
int
operation
,
const
char
*
database
,
...
@@ -159,7 +159,7 @@ protected:
...
@@ -159,7 +159,7 @@ protected:
Sqlite3Db
*
db
=
static_cast
<
Sqlite3Db
*>
(
v_this
);
Sqlite3Db
*
db
=
static_cast
<
Sqlite3Db
*>
(
v_this
);
Local
<
Value
>
args
[]
=
{
Int32
::
New
(
operation
),
String
::
New
(
database
),
Local
<
Value
>
args
[]
=
{
Int32
::
New
(
operation
),
String
::
New
(
database
),
String
::
New
(
table
),
Number
::
New
(
rowid
)
};
String
::
New
(
table
),
Number
::
New
(
rowid
)
};
db
->
Emit
(
"update"
,
4
,
args
);
db
->
Emit
(
String
::
New
(
"update"
)
,
4
,
args
);
}
}
/*
/*
...
...
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