Skip to content

Commit

Permalink
reorganized workers
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Wise committed Sep 1, 2016
1 parent 5c40df9 commit 6f58d25
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 40 deletions.
12 changes: 6 additions & 6 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/objects/database/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/objects/statement/statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include <nan.h>
#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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <sqlite3.h>
#include <nan.h>
#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),
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/workers/open.cc → src/workers/database-workers/open.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <sqlite3.h>
#include <nan.h>
#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;
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/workers/all.cc → src/workers/statement-workers/all.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include <nan.h>
#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<Nan::AsyncWorker>(stmt, handle, handle_index, cb),
Expand Down
4 changes: 2 additions & 2 deletions src/workers/all.h → src/workers/statement-workers/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <sqlite3.h>
#include <nan.h>
#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<Nan::AsyncWorker> {
Expand Down
8 changes: 4 additions & 4 deletions src/workers/each.cc → src/workers/statement-workers/each.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include <nan.h>
#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<Nan::AsyncProgressWorker>(stmt, handle, handle_index, cb),
Expand Down
4 changes: 2 additions & 2 deletions src/workers/each.h → src/workers/statement-workers/each.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <sqlite3.h>
#include <nan.h>
#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<Nan::AsyncProgressWorker> {
Expand Down
6 changes: 3 additions & 3 deletions src/workers/get.cc → src/workers/statement-workers/get.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include <nan.h>
#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<Nan::AsyncWorker>(stmt, handle, handle_index, cb) {}
Expand Down
2 changes: 1 addition & 1 deletion src/workers/get.h → src/workers/statement-workers/get.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <sqlite3.h>
#include <nan.h>
#include "statement-worker.h"
#include "../util/data.h"
#include "../../util/data.h"
class Statement;

class GetWorker : public StatementWorker<Nan::AsyncWorker> {
Expand Down
4 changes: 2 additions & 2 deletions src/workers/run.cc → src/workers/statement-workers/run.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <nan.h>
#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<Nan::AsyncWorker>(stmt, handle, handle_index, cb) {}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include <sqlite3.h>
#include <nan.h>
#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 T>
class StatementWorker : public T {
Expand Down

0 comments on commit 6f58d25

Please sign in to comment.