diff --git a/binding.gyp b/binding.gyp index af458cf40..05eeb270a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -11,12 +11,12 @@ "src/objects/database/database.cc", "src/objects/statement/statement.cc", "src/objects/transaction/transaction.cc", - "src/workers/open.cc", - "src/workers/close.cc", - "src/workers/run.cc", - "src/workers/get.cc", - "src/workers/all.cc", - "src/workers/each.cc", + "src/workers/database-workers/open.cc", + "src/workers/database-workers/close.cc", + "src/workers/statement-workers/run.cc", + "src/workers/statement-workers/get.cc", + "src/workers/statement-workers/all.cc", + "src/workers/statement-workers/each.cc", "src/binder/binder.cc", "src/multi-binder/multi-binder.cc", "src/sqlite3_plus.cc" diff --git a/src/objects/database/database.cc b/src/objects/database/database.cc index 43cd1342a..d48e00055 100644 --- a/src/objects/database/database.cc +++ b/src/objects/database/database.cc @@ -3,8 +3,8 @@ #include "database.h" #include "../statement/statement.h" #include "../transaction/transaction.h" -#include "../../workers/open.h" -#include "../../workers/close.h" +#include "../../workers/database-workers/open.h" +#include "../../workers/database-workers/close.h" #include "../../util/macros.h" #include "../../util/handle-manager.h" #include "../../util/frozen-buffer.h" diff --git a/src/objects/statement/statement.cc b/src/objects/statement/statement.cc index 87badf555..9569d954a 100644 --- a/src/objects/statement/statement.cc +++ b/src/objects/statement/statement.cc @@ -2,10 +2,10 @@ #include #include "statement.h" #include "../database/database.h" -#include "../../workers/run.h" -#include "../../workers/get.h" -#include "../../workers/all.h" -#include "../../workers/each.h" +#include "../../workers/statement-workers/run.h" +#include "../../workers/statement-workers/get.h" +#include "../../workers/statement-workers/all.h" +#include "../../workers/statement-workers/each.h" #include "../../util/macros.h" #include "../../util/handle-manager.h" #include "../../util/frozen-buffer.h" diff --git a/src/workers/close.cc b/src/workers/database-workers/close.cc similarity index 89% rename from src/workers/close.cc rename to src/workers/database-workers/close.cc index 6fabdd2e6..d08ce1175 100644 --- a/src/workers/close.cc +++ b/src/workers/database-workers/close.cc @@ -1,10 +1,10 @@ #include #include #include "close.h" -#include "../objects/database/database.h" -#include "../objects/statement/statement.h" -#include "../objects/transaction/transaction.h" -#include "../util/macros.h" +#include "../../objects/database/database.h" +#include "../../objects/statement/statement.h" +#include "../../objects/transaction/transaction.h" +#include "../../util/macros.h" CloseWorker::CloseWorker(Database* db, bool still_connecting) : Nan::AsyncWorker(NULL), db(db), diff --git a/src/workers/close.h b/src/workers/database-workers/close.h similarity index 100% rename from src/workers/close.h rename to src/workers/database-workers/close.h diff --git a/src/workers/open.cc b/src/workers/database-workers/open.cc similarity index 96% rename from src/workers/open.cc rename to src/workers/database-workers/open.cc index 07f9b78b7..daa66c0c1 100644 --- a/src/workers/open.cc +++ b/src/workers/database-workers/open.cc @@ -1,8 +1,8 @@ #include #include #include "open.h" -#include "../objects/database/database.h" -#include "../util/macros.h" +#include "../../objects/database/database.h" +#include "../../util/macros.h" const int WRITE_MODE = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_SHAREDCACHE; const int READ_MODE = SQLITE_OPEN_READONLY | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_SHAREDCACHE; diff --git a/src/workers/open.h b/src/workers/database-workers/open.h similarity index 100% rename from src/workers/open.h rename to src/workers/database-workers/open.h diff --git a/src/workers/all.cc b/src/workers/statement-workers/all.cc similarity index 92% rename from src/workers/all.cc rename to src/workers/statement-workers/all.cc index 0e1268087..7894e7847 100644 --- a/src/workers/all.cc +++ b/src/workers/statement-workers/all.cc @@ -2,10 +2,10 @@ #include #include "all.h" #include "statement-worker.h" -#include "../objects/statement/statement.h" -#include "../util/macros.h" -#include "../util/data.h" -#include "../util/list.h" +#include "../../objects/statement/statement.h" +#include "../../util/macros.h" +#include "../../util/data.h" +#include "../../util/list.h" AllWorker::AllWorker(Statement* stmt, sqlite3_stmt* handle, int handle_index, Nan::Callback* cb) : StatementWorker(stmt, handle, handle_index, cb), diff --git a/src/workers/all.h b/src/workers/statement-workers/all.h similarity index 87% rename from src/workers/all.h rename to src/workers/statement-workers/all.h index 334585752..fb24891fb 100644 --- a/src/workers/all.h +++ b/src/workers/statement-workers/all.h @@ -4,8 +4,8 @@ #include #include #include "statement-worker.h" -#include "../util/data.h" -#include "../util/list.h" +#include "../../util/data.h" +#include "../../util/list.h" class Statement; class AllWorker : public StatementWorker { diff --git a/src/workers/each.cc b/src/workers/statement-workers/each.cc similarity index 95% rename from src/workers/each.cc rename to src/workers/statement-workers/each.cc index 8710ab2bc..de4cb94e2 100644 --- a/src/workers/each.cc +++ b/src/workers/statement-workers/each.cc @@ -3,10 +3,10 @@ #include #include "each.h" #include "statement-worker.h" -#include "../objects/statement/statement.h" -#include "../util/macros.h" -#include "../util/data.h" -#include "../util/list.h" +#include "../../objects/statement/statement.h" +#include "../../util/macros.h" +#include "../../util/data.h" +#include "../../util/list.h" EachWorker::EachWorker(Statement* stmt, sqlite3_stmt* handle, int handle_index, Nan::Callback* cb, Nan::Callback* progressCb) : StatementWorker(stmt, handle, handle_index, cb), diff --git a/src/workers/each.h b/src/workers/statement-workers/each.h similarity index 92% rename from src/workers/each.h rename to src/workers/statement-workers/each.h index cd2a24d59..95d5e905e 100644 --- a/src/workers/each.h +++ b/src/workers/statement-workers/each.h @@ -5,8 +5,8 @@ #include #include #include "statement-worker.h" -#include "../util/data.h" -#include "../util/list.h" +#include "../../util/data.h" +#include "../../util/list.h" class Statement; class EachWorker : public StatementWorker { diff --git a/src/workers/get.cc b/src/workers/statement-workers/get.cc similarity index 91% rename from src/workers/get.cc rename to src/workers/statement-workers/get.cc index 48c15b817..1267bdf55 100644 --- a/src/workers/get.cc +++ b/src/workers/statement-workers/get.cc @@ -2,9 +2,9 @@ #include #include "get.h" #include "statement-worker.h" -#include "../objects/statement/statement.h" -#include "../util/macros.h" -#include "../util/data.h" +#include "../../objects/statement/statement.h" +#include "../../util/macros.h" +#include "../../util/data.h" GetWorker::GetWorker(Statement* stmt, sqlite3_stmt* handle, int handle_index, Nan::Callback* cb) : StatementWorker(stmt, handle, handle_index, cb) {} diff --git a/src/workers/get.h b/src/workers/statement-workers/get.h similarity index 92% rename from src/workers/get.h rename to src/workers/statement-workers/get.h index 4623cfaf0..15231d99e 100644 --- a/src/workers/get.h +++ b/src/workers/statement-workers/get.h @@ -4,7 +4,7 @@ #include #include #include "statement-worker.h" -#include "../util/data.h" +#include "../../util/data.h" class Statement; class GetWorker : public StatementWorker { diff --git a/src/workers/run.cc b/src/workers/statement-workers/run.cc similarity index 91% rename from src/workers/run.cc rename to src/workers/statement-workers/run.cc index c589c4e87..c85933cf9 100644 --- a/src/workers/run.cc +++ b/src/workers/statement-workers/run.cc @@ -2,8 +2,8 @@ #include #include "run.h" #include "statement-worker.h" -#include "../objects/statement/statement.h" -#include "../util/macros.h" +#include "../../objects/statement/statement.h" +#include "../../util/macros.h" RunWorker::RunWorker(Statement* stmt, sqlite3_stmt* handle, int handle_index, Nan::Callback* cb) : StatementWorker(stmt, handle, handle_index, cb) {} diff --git a/src/workers/run.h b/src/workers/statement-workers/run.h similarity index 100% rename from src/workers/run.h rename to src/workers/statement-workers/run.h diff --git a/src/workers/statement-worker.h b/src/workers/statement-workers/statement-worker.h similarity index 89% rename from src/workers/statement-worker.h rename to src/workers/statement-workers/statement-worker.h index d4293ba4d..cf75340c1 100644 --- a/src/workers/statement-worker.h +++ b/src/workers/statement-workers/statement-worker.h @@ -3,10 +3,10 @@ #include #include -#include "../objects/database/database.h" -#include "../objects/statement/statement.h" -#include "../util/macros.h" -#include "../util/handle-manager.h" +#include "../../objects/database/database.h" +#include "../../objects/statement/statement.h" +#include "../../util/macros.h" +#include "../../util/handle-manager.h" template class StatementWorker : public T {