Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe53cfe

Browse files
author
Dane Springmeyer
committed
Revert "Add support for sqlite3_interrupt"
1 parent 68dcc13 commit fe53cfe

File tree

3 files changed

+0
-93
lines changed

3 files changed

+0
-93
lines changed

src/database.cc

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ NAN_MODULE_INIT(Database::Init) {
2323
Nan::SetPrototypeMethod(t, "serialize", Serialize);
2424
Nan::SetPrototypeMethod(t, "parallelize", Parallelize);
2525
Nan::SetPrototypeMethod(t, "configure", Configure);
26-
Nan::SetPrototypeMethod(t, "interrupt", Interrupt);
2726

2827
NODE_SET_GETTER(t, "open", OpenGetter);
2928

@@ -225,8 +224,6 @@ void Database::Work_BeginClose(Baton* baton) {
225224
assert(baton->db->pending == 0);
226225

227226
baton->db->RemoveCallbacks();
228-
baton->db->closing = true;
229-
230227
int status = uv_queue_work(uv_default_loop(),
231228
&baton->request, Work_Close, (uv_after_work_cb)Work_AfterClose);
232229
assert(status == 0);
@@ -252,8 +249,6 @@ void Database::Work_AfterClose(uv_work_t* req) {
252249
Baton* baton = static_cast<Baton*>(req->data);
253250
Database* db = baton->db;
254251

255-
db->closing = false;
256-
257252
Local<Value> argv[1];
258253
if (baton->status != SQLITE_OK) {
259254
EXCEPTION(Nan::New(baton->message.c_str()).ToLocalChecked(), baton->status, exception);
@@ -356,21 +351,6 @@ NAN_METHOD(Database::Configure) {
356351
info.GetReturnValue().Set(info.This());
357352
}
358353

359-
NAN_METHOD(Database::Interrupt) {
360-
Database* db = Nan::ObjectWrap::Unwrap<Database>(info.This());
361-
362-
if (!db->open) {
363-
return Nan::ThrowError("Database is not open");
364-
}
365-
366-
if (db->closing) {
367-
return Nan::ThrowError("Database is closing");
368-
}
369-
370-
sqlite3_interrupt(db->_handle);
371-
info.GetReturnValue().Set(info.This());
372-
}
373-
374354
void Database::SetBusyTimeout(Baton* baton) {
375355
assert(baton->db->open);
376356
assert(baton->db->_handle);

src/database.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class Database : public Nan::ObjectWrap {
104104
_handle(NULL),
105105
open(false),
106106
locked(false),
107-
closing(false),
108107
pending(0),
109108
serialize(false),
110109
debug_trace(NULL),
@@ -152,8 +151,6 @@ class Database : public Nan::ObjectWrap {
152151

153152
static NAN_METHOD(Configure);
154153

155-
static NAN_METHOD(Interrupt);
156-
157154
static void SetBusyTimeout(Baton* baton);
158155

159156
static void RegisterTraceCallback(Baton* baton);
@@ -174,7 +171,6 @@ class Database : public Nan::ObjectWrap {
174171
sqlite3* _handle;
175172

176173
bool open;
177-
bool closing;
178174
bool locked;
179175
unsigned int pending;
180176

test/interrupt.test.js

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)