Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe53cfe

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

3 files changed

-93Lines changed: 0 additions & 93 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/database.cc‎

Copy file name to clipboardExpand all lines: src/database.cc
-20Lines 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);
Collapse file

‎src/database.h‎

Copy file name to clipboardExpand all lines: src/database.h
-4Lines 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

Collapse file

‎test/interrupt.test.js‎

Copy file name to clipboardExpand all lines: test/interrupt.test.js
-69Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.