diff --git a/src/better_sqlite3.cpp b/src/better_sqlite3.cpp index a11f27e..da90737 100644 --- a/src/better_sqlite3.cpp +++ b/src/better_sqlite3.cpp @@ -77,16 +77,10 @@ NODE_MODULE_INIT(/* exports, context */) { #define LZZ_INLINE inline namespace Data { static char const FLAT = 0; -} -namespace Data { static char const PLUCK = 1; -} -namespace Data { static char const EXPAND = 2; -} -namespace Data { static char const RAW = 3; -} +} // namespace Data void ThrowError(char const* message) { v8 ::Isolate* isolate = v8 ::Isolate ::GetCurrent(); isolate->ThrowException( @@ -2569,8 +2563,6 @@ v8::Local GetValueJS(v8::Isolate* isolate, assert(false); ; } -} // namespace Data -namespace Data { v8::Local GetValueJS(v8::Isolate* isolate, sqlite3_value* value, bool safe_ints) { @@ -2597,8 +2589,6 @@ v8::Local GetValueJS(v8::Isolate* isolate, assert(false); ; } -} // namespace Data -namespace Data { #ifdef V8_HAS_LOCAL_VECTOR v8::Local GetFlatRowJS(v8::Isolate* isolate, v8::Local ctx, @@ -2668,8 +2658,6 @@ v8::Local GetExpandedRowJS(v8::Isolate* isolate, } return row; } -} // namespace Data -namespace Data { v8::Local GetRawRowJS(v8::Isolate* isolate, v8::Local ctx, sqlite3_stmt* handle, @@ -2682,8 +2670,6 @@ v8::Local GetRawRowJS(v8::Isolate* isolate, } return row; } -} // namespace Data -namespace Data { #ifdef V8_HAS_LOCAL_VECTOR v8::Local GetRowJS(v8::Isolate* isolate, v8::Local ctx, @@ -2711,8 +2697,6 @@ v8::Local GetRowJS(v8::Isolate* isolate, assert(false); return v8::Local(); } -} // namespace Data -namespace Data { void GetArgumentsJS(v8::Isolate* isolate, v8::Local* out, sqlite3_value** values, @@ -2723,8 +2707,6 @@ void GetArgumentsJS(v8::Isolate* isolate, out[i] = Data::GetValueJS(isolate, values[i], safe_ints); } } -} // namespace Data -namespace Data { int BindValueFromJS(v8::Isolate* isolate, sqlite3_stmt* handle, int index, @@ -2750,8 +2732,6 @@ int BindValueFromJS(v8::Isolate* isolate, }; return value->IsBigInt() ? SQLITE_TOOBIG : -1; } -} // namespace Data -namespace Data { void ResultValueFromJS(v8::Isolate* isolate, sqlite3_context* invocation, v8::Local value, diff --git a/src/better_sqlite3.hpp b/src/better_sqlite3.hpp index 3bba10f..af600b1 100644 --- a/src/better_sqlite3.hpp +++ b/src/better_sqlite3.hpp @@ -549,13 +549,9 @@ v8::Local GetValueJS(v8::Isolate* isolate, sqlite3_stmt* handle, int column, bool safe_ints); -} -namespace Data { v8::Local GetValueJS(v8::Isolate* isolate, sqlite3_value* value, bool safe_ints); -} -namespace Data { #ifdef V8_HAS_LOCAL_VECTOR v8::Local GetFlatRowJS(v8::Isolate* isolate, v8::Local ctx, @@ -572,14 +568,10 @@ v8::Local GetExpandedRowJS(v8::Isolate* isolate, v8::Local ctx, sqlite3_stmt* handle, bool safe_ints); -} -namespace Data { v8::Local GetRawRowJS(v8::Isolate* isolate, v8::Local ctx, sqlite3_stmt* handle, bool safe_ints); -} -namespace Data { #ifdef V8_HAS_LOCAL_VECTOR v8::Local GetRowJS(v8::Isolate* isolate, v8::Local ctx, @@ -599,19 +591,15 @@ void GetArgumentsJS(v8::Isolate* isolate, sqlite3_value** values, int argument_count, bool safe_ints); -} -namespace Data { int BindValueFromJS(v8::Isolate* isolate, sqlite3_stmt* handle, int index, v8::Local value); -} -namespace Data { void ResultValueFromJS(v8::Isolate* isolate, sqlite3_context* invocation, v8::Local value, DataConverter* converter); -} +} // namespace Data class Binder { public: explicit Binder(sqlite3_stmt* _handle);