diff --git a/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.cpp b/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.cpp index 74983e0a..1fdc3076 100644 --- a/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.cpp +++ b/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.cpp @@ -1,11 +1,11 @@ #include "HybridNitroSQLite.hpp" +#include "../NitroSQLiteException.hpp" +#include "../importSqlFile.hpp" +#include "../logs.hpp" +#include "../macros.hpp" +#include "../operations.hpp" +#include "../sqliteExecuteBatch.hpp" #include "HybridNitroSQLiteQueryResult.hpp" -#include "NitroSQLiteException.hpp" -#include "importSqlFile.hpp" -#include "logs.hpp" -#include "macros.hpp" -#include "operations.hpp" -#include "sqliteExecuteBatch.hpp" #include #include #include diff --git a/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.hpp b/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.hpp index a5331964..e608e341 100644 --- a/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.hpp +++ b/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLite.hpp @@ -1,10 +1,8 @@ #pragma once +#include "../types.hpp" #include "HybridNitroSQLiteQueryResultSpec.hpp" #include "HybridNitroSQLiteSpec.hpp" -#include "types.hpp" - -using namespace margelo::rnnitrosqlite; namespace margelo::nitro::rnnitrosqlite { diff --git a/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLiteQueryResult.hpp b/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLiteQueryResult.hpp index 144f3f7e..9563d224 100644 --- a/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLiteQueryResult.hpp +++ b/packages/react-native-nitro-sqlite/cpp/hybridObjects/HybridNitroSQLiteQueryResult.hpp @@ -1,11 +1,9 @@ #pragma once +#include "../types.hpp" #include "HybridNitroSQLiteQueryResultSpec.hpp" -#include "types.hpp" #include -using namespace margelo::rnnitrosqlite; - namespace margelo::nitro::rnnitrosqlite { class HybridNitroSQLiteQueryResult : public HybridNitroSQLiteQueryResultSpec { diff --git a/packages/react-native-nitro-sqlite/cpp/importSqlFile.cpp b/packages/react-native-nitro-sqlite/cpp/importSqlFile.cpp index e38f06f0..44573a1a 100644 --- a/packages/react-native-nitro-sqlite/cpp/importSqlFile.cpp +++ b/packages/react-native-nitro-sqlite/cpp/importSqlFile.cpp @@ -8,7 +8,7 @@ #include #include -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { SQLiteOperationResult importSqlFile(const std::string& dbName, const std::string& fileLocation) { return importSqlFile(sqliteGetOpenDatabase(dbName), fileLocation); @@ -50,4 +50,4 @@ SQLiteOperationResult importSqlFile(const SQLiteConnectionPtr& connection, const } } -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/importSqlFile.hpp b/packages/react-native-nitro-sqlite/cpp/importSqlFile.hpp index 766c6779..45328933 100644 --- a/packages/react-native-nitro-sqlite/cpp/importSqlFile.hpp +++ b/packages/react-native-nitro-sqlite/cpp/importSqlFile.hpp @@ -9,11 +9,11 @@ #include "types.hpp" #include -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { struct SQLiteConnection; SQLiteOperationResult importSqlFile(const std::string& dbName, const std::string& fileLocation); SQLiteOperationResult importSqlFile(const std::shared_ptr& connection, const std::string& fileLocation); -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/operations.cpp b/packages/react-native-nitro-sqlite/cpp/operations.cpp index 8c99db01..5b42c3d1 100644 --- a/packages/react-native-nitro-sqlite/cpp/operations.cpp +++ b/packages/react-native-nitro-sqlite/cpp/operations.cpp @@ -22,10 +22,8 @@ #endif using namespace facebook; -using namespace margelo::nitro; -using namespace margelo::nitro::rnnitrosqlite; -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { static constexpr double kInt64MinAsDouble = static_cast(std::numeric_limits::min()); static constexpr double kInt64UpperBoundAsDouble = -kInt64MinAsDouble; @@ -355,4 +353,4 @@ SQLiteOperationResult sqliteExecuteCommand(const SQLiteConnectionPtr& connection return {.rowsAffected = isReadOnly ? 0 : sqlite3_changes(db)}; } -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/operations.hpp b/packages/react-native-nitro-sqlite/cpp/operations.hpp index 549d68e5..8ef1772c 100644 --- a/packages/react-native-nitro-sqlite/cpp/operations.hpp +++ b/packages/react-native-nitro-sqlite/cpp/operations.hpp @@ -7,7 +7,7 @@ #include #include -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { // Calls against one connection are serialized by `mutex`. Separate connections // intentionally remain independent, so SQLITE_THREADSAFE=0 still requires the @@ -53,4 +53,4 @@ SQLiteOperationResult sqliteExecuteCommand(const SQLiteConnectionPtr& connection void sqliteCloseAll(); -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.cpp b/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.cpp index 0e3d92ca..783a44e4 100644 --- a/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.cpp +++ b/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.cpp @@ -6,7 +6,7 @@ #include "operations.hpp" #include -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { std::vector batchParamsToCommands(const std::vector& batchParams) { auto commands = std::vector(); @@ -67,4 +67,4 @@ SQLiteOperationResult sqliteExecuteBatch(const SQLiteConnectionPtr& connection, } } -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.hpp b/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.hpp index aa68152c..5db205d5 100644 --- a/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.hpp +++ b/packages/react-native-nitro-sqlite/cpp/sqliteExecuteBatch.hpp @@ -7,10 +7,7 @@ #include "types.hpp" #include -using namespace facebook; -using namespace margelo::nitro; - -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { struct SQLiteConnection; @@ -31,4 +28,4 @@ std::vector batchParamsToCommands(const std::vector& commands); SQLiteOperationResult sqliteExecuteBatch(const std::shared_ptr& connection, const std::vector& commands); -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/types.hpp b/packages/react-native-nitro-sqlite/cpp/types.hpp index eefa83a0..ac4c6090 100644 --- a/packages/react-native-nitro-sqlite/cpp/types.hpp +++ b/packages/react-native-nitro-sqlite/cpp/types.hpp @@ -5,12 +5,9 @@ #include #include -using namespace margelo::nitro; -using namespace margelo::nitro::rnnitrosqlite; +namespace margelo::nitro::rnnitrosqlite { -namespace margelo::rnnitrosqlite { - -using SQLiteValue = std::variant, std::string, double>; +using SQLiteValue = std::variant, std::string, double>; using SQLiteQueryParams = std::vector; using SQLiteQueryResultRow = std::unordered_map; using SQLiteQueryResults = std::vector; @@ -40,4 +37,4 @@ inline ColumnType mapSQLiteTypeToColumnType(const char* type) { } } -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite diff --git a/packages/react-native-nitro-sqlite/cpp/utils.hpp b/packages/react-native-nitro-sqlite/cpp/utils.hpp index f6948cbb..7577e3d8 100644 --- a/packages/react-native-nitro-sqlite/cpp/utils.hpp +++ b/packages/react-native-nitro-sqlite/cpp/utils.hpp @@ -3,7 +3,7 @@ #include #include -namespace margelo::rnnitrosqlite { +namespace margelo::nitro::rnnitrosqlite { bool folder_exists(const std::string& foldername) { struct stat buffer; @@ -57,4 +57,4 @@ std::string get_db_path(const std::string& dbName, const std::string& docPath) { return docPath + "/" + dbName; } -} // namespace margelo::rnnitrosqlite +} // namespace margelo::nitro::rnnitrosqlite