Commit 0ed18f52 by Eric Fredricksen

Node version v0.1.25-15-g4e16e38

parent 17e85536
...@@ -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.18 Tested with Node version v0.1.25-15-g4e16e38
(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
...@@ -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);
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment