react-native-nitro-sqlite 9.2.2 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +1 -1
- package/cpp/NitroSQLiteException.hpp +1 -2
- package/cpp/{specs → hybridObjects}/HybridNitroSQLite.cpp +64 -16
- package/cpp/{specs → hybridObjects}/HybridNitroSQLite.hpp +6 -6
- package/cpp/hybridObjects/HybridNitroSQLiteQueryResult.cpp +93 -0
- package/cpp/hybridObjects/HybridNitroSQLiteQueryResult.hpp +47 -0
- package/cpp/operations.cpp +16 -12
- package/cpp/operations.hpp +3 -1
- package/cpp/sqliteExecuteBatch.cpp +2 -2
- package/cpp/sqliteExecuteBatch.hpp +2 -2
- package/cpp/types.hpp +4 -14
- package/ios/NitroSQLite.xcodeproj/project.pbxproj +2 -2
- package/lib/commonjs/index.js +0 -25
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/operations/execute.js +19 -32
- package/lib/commonjs/operations/execute.js.map +1 -1
- package/lib/commonjs/operations/executeBatch.js +2 -19
- package/lib/commonjs/operations/executeBatch.js.map +1 -1
- package/lib/commonjs/specs/{NativeQueryResult.nitro.js → NitroSQLiteQueryResult.nitro.js} +1 -1
- package/lib/commonjs/specs/NitroSQLiteQueryResult.nitro.js.map +1 -0
- package/lib/commonjs/types.js +1 -8
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/operations/execute.js +19 -33
- package/lib/module/operations/execute.js.map +1 -1
- package/lib/module/operations/executeBatch.js +2 -19
- package/lib/module/operations/executeBatch.js.map +1 -1
- package/lib/module/specs/NitroSQLiteQueryResult.nitro.js +4 -0
- package/lib/module/specs/NitroSQLiteQueryResult.nitro.js.map +1 -0
- package/lib/module/types.js +0 -12
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +0 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/operations/execute.d.ts +1 -1
- package/lib/typescript/commonjs/operations/execute.d.ts.map +1 -1
- package/lib/typescript/commonjs/operations/executeBatch.d.ts +1 -1
- package/lib/typescript/commonjs/operations/executeBatch.d.ts.map +1 -1
- package/lib/typescript/commonjs/operations/transaction.d.ts.map +1 -1
- package/lib/typescript/commonjs/specs/NitroSQLite.nitro.d.ts +6 -6
- package/lib/typescript/commonjs/specs/NitroSQLite.nitro.d.ts.map +1 -1
- package/lib/typescript/{module/specs/NativeQueryResult.nitro.d.ts → commonjs/specs/NitroSQLiteQueryResult.nitro.d.ts} +7 -13
- package/lib/typescript/commonjs/specs/NitroSQLiteQueryResult.nitro.d.ts.map +1 -0
- package/lib/typescript/commonjs/typeORM.d.ts +1 -1
- package/lib/typescript/commonjs/typeORM.d.ts.map +1 -1
- package/lib/typescript/commonjs/types.d.ts +21 -37
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +0 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/operations/execute.d.ts +1 -1
- package/lib/typescript/module/operations/execute.d.ts.map +1 -1
- package/lib/typescript/module/operations/executeBatch.d.ts +1 -1
- package/lib/typescript/module/operations/executeBatch.d.ts.map +1 -1
- package/lib/typescript/module/operations/transaction.d.ts.map +1 -1
- package/lib/typescript/module/specs/NitroSQLite.nitro.d.ts +6 -6
- package/lib/typescript/module/specs/NitroSQLite.nitro.d.ts.map +1 -1
- package/lib/typescript/{commonjs/specs/NativeQueryResult.nitro.d.ts → module/specs/NitroSQLiteQueryResult.nitro.d.ts} +7 -13
- package/lib/typescript/module/specs/NitroSQLiteQueryResult.nitro.d.ts.map +1 -0
- package/lib/typescript/module/typeORM.d.ts +1 -1
- package/lib/typescript/module/typeORM.d.ts.map +1 -1
- package/lib/typescript/module/types.d.ts +21 -37
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/nitrogen/generated/android/RNNitroSQLite+autolinking.cmake +9 -6
- package/nitrogen/generated/android/RNNitroSQLite+autolinking.gradle +1 -1
- package/nitrogen/generated/android/RNNitroSQLiteOnLoad.cpp +2 -4
- package/nitrogen/generated/android/RNNitroSQLiteOnLoad.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridNitroSQLiteOnLoadSpec.cpp +14 -1
- package/nitrogen/generated/android/c++/JHybridNitroSQLiteOnLoadSpec.hpp +4 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rnnitrosqlite/HybridNitroSQLiteOnLoadSpec.kt +8 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rnnitrosqlite/RNNitroSQLiteOnLoad.kt +1 -1
- package/nitrogen/generated/ios/RNNitroSQLite+autolinking.rb +2 -2
- package/nitrogen/generated/ios/RNNitroSQLite-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/RNNitroSQLite-Swift-Cxx-Bridge.hpp +1 -1
- package/nitrogen/generated/ios/RNNitroSQLite-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/RNNitroSQLiteAutolinking.mm +1 -1
- package/nitrogen/generated/ios/RNNitroSQLiteAutolinking.swift +5 -1
- package/nitrogen/generated/shared/c++/BatchQueryCommand.hpp +92 -0
- package/nitrogen/generated/shared/c++/BatchQueryResult.hpp +25 -11
- package/nitrogen/generated/shared/c++/ColumnType.hpp +5 -7
- package/nitrogen/generated/shared/c++/FileLoadResult.hpp +28 -14
- package/nitrogen/generated/shared/c++/HybridNitroSQLiteOnLoadSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroSQLiteOnLoadSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroSQLiteQueryResultSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridNitroSQLiteQueryResultSpec.hpp +73 -0
- package/nitrogen/generated/shared/c++/HybridNitroSQLiteSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridNitroSQLiteSpec.hpp +12 -16
- package/nitrogen/generated/shared/c++/NitroSQLiteQueryColumnMetadata.hpp +93 -0
- package/package.json +5 -5
- package/src/index.ts +0 -6
- package/src/operations/execute.ts +23 -58
- package/src/operations/executeBatch.ts +3 -41
- package/src/operations/session.ts +1 -1
- package/src/operations/transaction.ts +1 -1
- package/src/specs/NitroSQLite.nitro.ts +9 -12
- package/src/specs/{NativeQueryResult.nitro.ts → NitroSQLiteQueryResult.nitro.ts} +15 -17
- package/src/typeORM.ts +1 -1
- package/src/types.ts +28 -45
- package/cpp/specs/HybridNativeQueryResult.cpp +0 -21
- package/cpp/specs/HybridNativeQueryResult.hpp +0 -27
- package/lib/commonjs/nullHandling.js +0 -33
- package/lib/commonjs/nullHandling.js.map +0 -1
- package/lib/commonjs/specs/NativeQueryResult.nitro.js.map +0 -1
- package/lib/module/nullHandling.js +0 -25
- package/lib/module/nullHandling.js.map +0 -1
- package/lib/module/specs/NativeQueryResult.nitro.js +0 -4
- package/lib/module/specs/NativeQueryResult.nitro.js.map +0 -1
- package/lib/typescript/commonjs/nullHandling.d.ts +0 -8
- package/lib/typescript/commonjs/nullHandling.d.ts.map +0 -1
- package/lib/typescript/commonjs/specs/NativeQueryResult.nitro.d.ts.map +0 -1
- package/lib/typescript/module/nullHandling.d.ts +0 -8
- package/lib/typescript/module/nullHandling.d.ts.map +0 -1
- package/lib/typescript/module/specs/NativeQueryResult.nitro.d.ts.map +0 -1
- package/nitrogen/generated/shared/c++/HybridNativeQueryResultSpec.cpp +0 -24
- package/nitrogen/generated/shared/c++/HybridNativeQueryResultSpec.hpp +0 -77
- package/nitrogen/generated/shared/c++/NativeBatchQueryCommand.hpp +0 -81
- package/nitrogen/generated/shared/c++/SQLiteNullValue.hpp +0 -69
- package/nitrogen/generated/shared/c++/SQLiteQueryColumnMetadata.hpp +0 -79
- package/src/nullHandling.ts +0 -35
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// ColumnType.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -36,16 +36,14 @@ namespace margelo::nitro::rnnitrosqlite {
|
|
|
36
36
|
|
|
37
37
|
namespace margelo::nitro {
|
|
38
38
|
|
|
39
|
-
using namespace margelo::nitro::rnnitrosqlite;
|
|
40
|
-
|
|
41
39
|
// C++ ColumnType <> JS ColumnType (enum)
|
|
42
40
|
template <>
|
|
43
|
-
struct JSIConverter<ColumnType> final {
|
|
44
|
-
static inline ColumnType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
41
|
+
struct JSIConverter<margelo::nitro::rnnitrosqlite::ColumnType> final {
|
|
42
|
+
static inline margelo::nitro::rnnitrosqlite::ColumnType fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
43
|
int enumValue = JSIConverter<int>::fromJSI(runtime, arg);
|
|
46
|
-
return static_cast<ColumnType>(enumValue);
|
|
44
|
+
return static_cast<margelo::nitro::rnnitrosqlite::ColumnType>(enumValue);
|
|
47
45
|
}
|
|
48
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, ColumnType arg) {
|
|
46
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::rnnitrosqlite::ColumnType arg) {
|
|
49
47
|
int enumValue = static_cast<int>(arg);
|
|
50
48
|
return JSIConverter<int>::toJSI(runtime, enumValue);
|
|
51
49
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FileLoadResult.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
#else
|
|
18
18
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
19
|
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
20
30
|
|
|
21
31
|
|
|
22
32
|
|
|
@@ -27,7 +37,7 @@ namespace margelo::nitro::rnnitrosqlite {
|
|
|
27
37
|
/**
|
|
28
38
|
* A struct which can be represented as a JavaScript object (FileLoadResult).
|
|
29
39
|
*/
|
|
30
|
-
struct FileLoadResult {
|
|
40
|
+
struct FileLoadResult final {
|
|
31
41
|
public:
|
|
32
42
|
std::optional<double> commands SWIFT_PRIVATE;
|
|
33
43
|
std::optional<double> rowsAffected SWIFT_PRIVATE;
|
|
@@ -35,28 +45,29 @@ namespace margelo::nitro::rnnitrosqlite {
|
|
|
35
45
|
public:
|
|
36
46
|
FileLoadResult() = default;
|
|
37
47
|
explicit FileLoadResult(std::optional<double> commands, std::optional<double> rowsAffected): commands(commands), rowsAffected(rowsAffected) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const FileLoadResult& lhs, const FileLoadResult& rhs) = default;
|
|
38
51
|
};
|
|
39
52
|
|
|
40
53
|
} // namespace margelo::nitro::rnnitrosqlite
|
|
41
54
|
|
|
42
55
|
namespace margelo::nitro {
|
|
43
56
|
|
|
44
|
-
using namespace margelo::nitro::rnnitrosqlite;
|
|
45
|
-
|
|
46
57
|
// C++ FileLoadResult <> JS FileLoadResult (object)
|
|
47
58
|
template <>
|
|
48
|
-
struct JSIConverter<FileLoadResult> final {
|
|
49
|
-
static inline FileLoadResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
59
|
+
struct JSIConverter<margelo::nitro::rnnitrosqlite::FileLoadResult> final {
|
|
60
|
+
static inline margelo::nitro::rnnitrosqlite::FileLoadResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
51
|
-
return FileLoadResult(
|
|
52
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "commands")),
|
|
53
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "rowsAffected"))
|
|
62
|
+
return margelo::nitro::rnnitrosqlite::FileLoadResult(
|
|
63
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "commands"))),
|
|
64
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "rowsAffected")))
|
|
54
65
|
);
|
|
55
66
|
}
|
|
56
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const FileLoadResult& arg) {
|
|
67
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rnnitrosqlite::FileLoadResult& arg) {
|
|
57
68
|
jsi::Object obj(runtime);
|
|
58
|
-
obj.setProperty(runtime, "commands", JSIConverter<std::optional<double>>::toJSI(runtime, arg.commands));
|
|
59
|
-
obj.setProperty(runtime, "rowsAffected", JSIConverter<std::optional<double>>::toJSI(runtime, arg.rowsAffected));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "commands"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.commands));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "rowsAffected"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.rowsAffected));
|
|
60
71
|
return obj;
|
|
61
72
|
}
|
|
62
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -64,8 +75,11 @@ namespace margelo::nitro {
|
|
|
64
75
|
return false;
|
|
65
76
|
}
|
|
66
77
|
jsi::Object obj = value.getObject(runtime);
|
|
67
|
-
if (!
|
|
68
|
-
|
|
78
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "commands")))) return false;
|
|
82
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "rowsAffected")))) return false;
|
|
69
83
|
return true;
|
|
70
84
|
}
|
|
71
85
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroSQLiteOnLoadSpec.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridNitroSQLiteOnLoadSpec.hpp"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroSQLiteQueryResultSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridNitroSQLiteQueryResultSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::rnnitrosqlite {
|
|
11
|
+
|
|
12
|
+
void HybridNitroSQLiteQueryResultSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridGetter("rowsAffected", &HybridNitroSQLiteQueryResultSpec::getRowsAffected);
|
|
18
|
+
prototype.registerHybridGetter("insertId", &HybridNitroSQLiteQueryResultSpec::getInsertId);
|
|
19
|
+
prototype.registerHybridGetter("results", &HybridNitroSQLiteQueryResultSpec::getResults);
|
|
20
|
+
prototype.registerHybridGetter("metadata", &HybridNitroSQLiteQueryResultSpec::getMetadata);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
} // namespace margelo::nitro::rnnitrosqlite
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroSQLiteQueryResultSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `NitroSQLiteQueryColumnMetadata` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::rnnitrosqlite { struct NitroSQLiteQueryColumnMetadata; }
|
|
18
|
+
|
|
19
|
+
#include <optional>
|
|
20
|
+
#include <string>
|
|
21
|
+
#include <NitroModules/Null.hpp>
|
|
22
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
23
|
+
#include <variant>
|
|
24
|
+
#include <unordered_map>
|
|
25
|
+
#include <vector>
|
|
26
|
+
#include "NitroSQLiteQueryColumnMetadata.hpp"
|
|
27
|
+
|
|
28
|
+
namespace margelo::nitro::rnnitrosqlite {
|
|
29
|
+
|
|
30
|
+
using namespace margelo::nitro;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* An abstract base class for `NitroSQLiteQueryResult`
|
|
34
|
+
* Inherit this class to create instances of `HybridNitroSQLiteQueryResultSpec` in C++.
|
|
35
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
36
|
+
* @example
|
|
37
|
+
* ```cpp
|
|
38
|
+
* class HybridNitroSQLiteQueryResult: public HybridNitroSQLiteQueryResultSpec {
|
|
39
|
+
* public:
|
|
40
|
+
* HybridNitroSQLiteQueryResult(...): HybridObject(TAG) { ... }
|
|
41
|
+
* // ...
|
|
42
|
+
* };
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
class HybridNitroSQLiteQueryResultSpec: public virtual HybridObject {
|
|
46
|
+
public:
|
|
47
|
+
// Constructor
|
|
48
|
+
explicit HybridNitroSQLiteQueryResultSpec(): HybridObject(TAG) { }
|
|
49
|
+
|
|
50
|
+
// Destructor
|
|
51
|
+
~HybridNitroSQLiteQueryResultSpec() override = default;
|
|
52
|
+
|
|
53
|
+
public:
|
|
54
|
+
// Properties
|
|
55
|
+
virtual double getRowsAffected() = 0;
|
|
56
|
+
virtual std::optional<double> getInsertId() = 0;
|
|
57
|
+
virtual std::vector<std::unordered_map<std::string, std::variant<nitro::NullType, bool, std::shared_ptr<ArrayBuffer>, std::string, double>>> getResults() = 0;
|
|
58
|
+
virtual std::optional<std::unordered_map<std::string, NitroSQLiteQueryColumnMetadata>> getMetadata() = 0;
|
|
59
|
+
|
|
60
|
+
public:
|
|
61
|
+
// Methods
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
protected:
|
|
65
|
+
// Hybrid Setup
|
|
66
|
+
void loadHybridMethods() override;
|
|
67
|
+
|
|
68
|
+
protected:
|
|
69
|
+
// Tag for logging
|
|
70
|
+
static constexpr auto TAG = "NitroSQLiteQueryResult";
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
} // namespace margelo::nitro::rnnitrosqlite
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroSQLiteSpec.cpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#include "HybridNitroSQLiteSpec.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridNitroSQLiteSpec.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -13,30 +13,26 @@
|
|
|
13
13
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
14
|
#endif
|
|
15
15
|
|
|
16
|
-
// Forward declaration of `
|
|
17
|
-
namespace margelo::nitro::rnnitrosqlite { class
|
|
18
|
-
// Forward declaration of `ArrayBuffer` to properly resolve imports.
|
|
19
|
-
namespace NitroModules { class ArrayBuffer; }
|
|
20
|
-
// Forward declaration of `SQLiteNullValue` to properly resolve imports.
|
|
21
|
-
namespace margelo::nitro::rnnitrosqlite { struct SQLiteNullValue; }
|
|
16
|
+
// Forward declaration of `HybridNitroSQLiteQueryResultSpec` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::rnnitrosqlite { class HybridNitroSQLiteQueryResultSpec; }
|
|
22
18
|
// Forward declaration of `BatchQueryResult` to properly resolve imports.
|
|
23
19
|
namespace margelo::nitro::rnnitrosqlite { struct BatchQueryResult; }
|
|
24
|
-
// Forward declaration of `
|
|
25
|
-
namespace margelo::nitro::rnnitrosqlite { struct
|
|
20
|
+
// Forward declaration of `BatchQueryCommand` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::rnnitrosqlite { struct BatchQueryCommand; }
|
|
26
22
|
// Forward declaration of `FileLoadResult` to properly resolve imports.
|
|
27
23
|
namespace margelo::nitro::rnnitrosqlite { struct FileLoadResult; }
|
|
28
24
|
|
|
29
25
|
#include <string>
|
|
30
26
|
#include <optional>
|
|
31
27
|
#include <memory>
|
|
32
|
-
#include "
|
|
28
|
+
#include "HybridNitroSQLiteQueryResultSpec.hpp"
|
|
29
|
+
#include <NitroModules/Null.hpp>
|
|
33
30
|
#include <NitroModules/ArrayBuffer.hpp>
|
|
34
|
-
#include "SQLiteNullValue.hpp"
|
|
35
31
|
#include <variant>
|
|
36
32
|
#include <vector>
|
|
37
33
|
#include <NitroModules/Promise.hpp>
|
|
38
34
|
#include "BatchQueryResult.hpp"
|
|
39
|
-
#include "
|
|
35
|
+
#include "BatchQueryCommand.hpp"
|
|
40
36
|
#include "FileLoadResult.hpp"
|
|
41
37
|
|
|
42
38
|
namespace margelo::nitro::rnnitrosqlite {
|
|
@@ -75,10 +71,10 @@ namespace margelo::nitro::rnnitrosqlite {
|
|
|
75
71
|
virtual void drop(const std::string& dbName, const std::optional<std::string>& location) = 0;
|
|
76
72
|
virtual void attach(const std::string& mainDbName, const std::string& dbNameToAttach, const std::string& alias, const std::optional<std::string>& location) = 0;
|
|
77
73
|
virtual void detach(const std::string& mainDbName, const std::string& alias) = 0;
|
|
78
|
-
virtual std::shared_ptr<
|
|
79
|
-
virtual std::shared_ptr<Promise<std::shared_ptr<
|
|
80
|
-
virtual BatchQueryResult executeBatch(const std::string& dbName, const std::vector<
|
|
81
|
-
virtual std::shared_ptr<Promise<BatchQueryResult>> executeBatchAsync(const std::string& dbName, const std::vector<
|
|
74
|
+
virtual std::shared_ptr<HybridNitroSQLiteQueryResultSpec> execute(const std::string& dbName, const std::string& query, const std::optional<std::vector<std::variant<nitro::NullType, bool, std::shared_ptr<ArrayBuffer>, std::string, double>>>& params) = 0;
|
|
75
|
+
virtual std::shared_ptr<Promise<std::shared_ptr<HybridNitroSQLiteQueryResultSpec>>> executeAsync(const std::string& dbName, const std::string& query, const std::optional<std::vector<std::variant<nitro::NullType, bool, std::shared_ptr<ArrayBuffer>, std::string, double>>>& params) = 0;
|
|
76
|
+
virtual BatchQueryResult executeBatch(const std::string& dbName, const std::vector<BatchQueryCommand>& commands) = 0;
|
|
77
|
+
virtual std::shared_ptr<Promise<BatchQueryResult>> executeBatchAsync(const std::string& dbName, const std::vector<BatchQueryCommand>& commands) = 0;
|
|
82
78
|
virtual FileLoadResult loadFile(const std::string& dbName, const std::string& location) = 0;
|
|
83
79
|
virtual std::shared_ptr<Promise<FileLoadResult>> loadFileAsync(const std::string& dbName, const std::string& location) = 0;
|
|
84
80
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroSQLiteQueryColumnMetadata.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `ColumnType` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::rnnitrosqlite { enum class ColumnType; }
|
|
33
|
+
|
|
34
|
+
#include <string>
|
|
35
|
+
#include "ColumnType.hpp"
|
|
36
|
+
|
|
37
|
+
namespace margelo::nitro::rnnitrosqlite {
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A struct which can be represented as a JavaScript object (NitroSQLiteQueryColumnMetadata).
|
|
41
|
+
*/
|
|
42
|
+
struct NitroSQLiteQueryColumnMetadata final {
|
|
43
|
+
public:
|
|
44
|
+
std::string name SWIFT_PRIVATE;
|
|
45
|
+
ColumnType type SWIFT_PRIVATE;
|
|
46
|
+
double index SWIFT_PRIVATE;
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
NitroSQLiteQueryColumnMetadata() = default;
|
|
50
|
+
explicit NitroSQLiteQueryColumnMetadata(std::string name, ColumnType type, double index): name(name), type(type), index(index) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const NitroSQLiteQueryColumnMetadata& lhs, const NitroSQLiteQueryColumnMetadata& rhs) = default;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
} // namespace margelo::nitro::rnnitrosqlite
|
|
57
|
+
|
|
58
|
+
namespace margelo::nitro {
|
|
59
|
+
|
|
60
|
+
// C++ NitroSQLiteQueryColumnMetadata <> JS NitroSQLiteQueryColumnMetadata (object)
|
|
61
|
+
template <>
|
|
62
|
+
struct JSIConverter<margelo::nitro::rnnitrosqlite::NitroSQLiteQueryColumnMetadata> final {
|
|
63
|
+
static inline margelo::nitro::rnnitrosqlite::NitroSQLiteQueryColumnMetadata fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
64
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
65
|
+
return margelo::nitro::rnnitrosqlite::NitroSQLiteQueryColumnMetadata(
|
|
66
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "name"))),
|
|
67
|
+
JSIConverter<margelo::nitro::rnnitrosqlite::ColumnType>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type"))),
|
|
68
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "index")))
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rnnitrosqlite::NitroSQLiteQueryColumnMetadata& arg) {
|
|
72
|
+
jsi::Object obj(runtime);
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "name"), JSIConverter<std::string>::toJSI(runtime, arg.name));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "type"), JSIConverter<margelo::nitro::rnnitrosqlite::ColumnType>::toJSI(runtime, arg.type));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "index"), JSIConverter<double>::toJSI(runtime, arg.index));
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
79
|
+
if (!value.isObject()) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
jsi::Object obj = value.getObject(runtime);
|
|
83
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "name")))) return false;
|
|
87
|
+
if (!JSIConverter<margelo::nitro::rnnitrosqlite::ColumnType>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "type")))) return false;
|
|
88
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "index")))) return false;
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
} // namespace margelo::nitro
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-sqlite",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
4
4
|
"description": "Fast SQLite library for React Native built using Nitro Modules",
|
|
5
5
|
"main": "./lib/module/index",
|
|
6
6
|
"module": "./lib/module/index",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "bun typecheck && bob build",
|
|
41
|
-
"specs": "bun typecheck && bun
|
|
41
|
+
"specs": "bun typecheck && bun nitrogen --logLevel=\"debug\"",
|
|
42
42
|
"typecheck": "tsc --noEmit",
|
|
43
43
|
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
|
|
44
44
|
"test": "jest",
|
|
@@ -70,16 +70,16 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"jest": "^30.2.0",
|
|
73
|
-
"
|
|
73
|
+
"nitrogen": "0.33.5",
|
|
74
74
|
"react": "19.1.1",
|
|
75
75
|
"react-native": "0.82.1",
|
|
76
76
|
"react-native-builder-bob": "^0.31.0",
|
|
77
|
-
"react-native-nitro-modules": "0.
|
|
77
|
+
"react-native-nitro-modules": "0.33.5"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"react": ">=17.0.0",
|
|
81
81
|
"react-native": ">=0.75.0",
|
|
82
|
-
"react-native-nitro-modules": ">=0.
|
|
82
|
+
"react-native-nitro-modules": ">=0.32.0"
|
|
83
83
|
},
|
|
84
84
|
"resolutions": {
|
|
85
85
|
"@types/react": "^18.2.44"
|
package/src/index.ts
CHANGED
|
@@ -22,12 +22,6 @@ export const NitroSQLite = {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export { open } from './operations/session'
|
|
25
|
-
export {
|
|
26
|
-
isNitroSQLiteNull,
|
|
27
|
-
NITRO_SQLITE_NULL,
|
|
28
|
-
isSimpleNullHandlingEnabled,
|
|
29
|
-
enableSimpleNullHandling,
|
|
30
|
-
} from './nullHandling'
|
|
31
25
|
export { default as NitroSQLiteError } from './NitroSQLiteError'
|
|
32
26
|
export type * from './types'
|
|
33
27
|
export { typeORMDriver } from './typeORM'
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
-
import { isNitroSQLiteNull, isSimpleNullHandlingEnabled } from '../nullHandling'
|
|
2
1
|
import { HybridNitroSQLite } from '../nitro'
|
|
3
|
-
import {
|
|
4
|
-
import type { NativeQueryResult } from '../specs/NativeQueryResult.nitro'
|
|
5
|
-
import type {
|
|
6
|
-
QueryResult,
|
|
7
|
-
NativeSQLiteQueryParams,
|
|
8
|
-
SQLiteQueryParams,
|
|
9
|
-
QueryResultRow,
|
|
10
|
-
} from '../types'
|
|
2
|
+
import type { QueryResult, QueryResultRow, SQLiteQueryParams } from '../types'
|
|
11
3
|
import NitroSQLiteError from '../NitroSQLiteError'
|
|
4
|
+
import type { NitroSQLiteQueryResult } from '../specs/NitroSQLiteQueryResult.nitro'
|
|
12
5
|
|
|
13
6
|
export function execute<Row extends QueryResultRow = never>(
|
|
14
7
|
dbName: string,
|
|
15
8
|
query: string,
|
|
16
9
|
params?: SQLiteQueryParams,
|
|
17
10
|
): QueryResult<Row> {
|
|
18
|
-
const transformedParams = isSimpleNullHandlingEnabled()
|
|
19
|
-
? toNativeQueryParams(params)
|
|
20
|
-
: (params as NativeSQLiteQueryParams)
|
|
21
|
-
|
|
22
11
|
try {
|
|
23
|
-
const nativeResult = HybridNitroSQLite.execute(
|
|
24
|
-
|
|
25
|
-
query,
|
|
26
|
-
transformedParams,
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
return buildJsQueryResult<Row>(nativeResult)
|
|
12
|
+
const nativeResult = HybridNitroSQLite.execute(dbName, query, params)
|
|
13
|
+
return buildJSQueryResult<Row>(nativeResult)
|
|
30
14
|
} catch (error) {
|
|
31
15
|
throw NitroSQLiteError.fromError(error)
|
|
32
16
|
}
|
|
@@ -37,55 +21,36 @@ export async function executeAsync<Row extends QueryResultRow = never>(
|
|
|
37
21
|
query: string,
|
|
38
22
|
params?: SQLiteQueryParams,
|
|
39
23
|
): Promise<QueryResult<Row>> {
|
|
40
|
-
const transformedParams = isSimpleNullHandlingEnabled()
|
|
41
|
-
? toNativeQueryParams(params)
|
|
42
|
-
: (params as NativeSQLiteQueryParams)
|
|
43
|
-
|
|
44
24
|
try {
|
|
45
25
|
const nativeResult = await HybridNitroSQLite.executeAsync(
|
|
46
26
|
dbName,
|
|
47
27
|
query,
|
|
48
|
-
|
|
28
|
+
params,
|
|
49
29
|
)
|
|
50
|
-
return
|
|
30
|
+
return buildJSQueryResult<Row>(nativeResult)
|
|
51
31
|
} catch (error) {
|
|
52
32
|
throw NitroSQLiteError.fromError(error)
|
|
53
33
|
}
|
|
54
34
|
}
|
|
55
35
|
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
):
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function buildJsQueryResult<Row extends QueryResultRow = never>({
|
|
63
|
-
insertId,
|
|
64
|
-
rowsAffected,
|
|
65
|
-
results,
|
|
66
|
-
}: NativeQueryResult): QueryResult<Row> {
|
|
67
|
-
let data: Row[] = results as Row[]
|
|
36
|
+
function buildJSQueryResult<Row extends QueryResultRow = never>(
|
|
37
|
+
result: NitroSQLiteQueryResult,
|
|
38
|
+
): QueryResult<Row> {
|
|
39
|
+
const resultWithRows = result as QueryResult<Row>
|
|
68
40
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (isNitroSQLiteNull(value)) {
|
|
74
|
-
return [key, null]
|
|
75
|
-
}
|
|
76
|
-
return [key, value]
|
|
77
|
-
}),
|
|
78
|
-
),
|
|
79
|
-
) as Row[]
|
|
41
|
+
resultWithRows.rows = {
|
|
42
|
+
_array: result.results as Row[],
|
|
43
|
+
length: result.results.length,
|
|
44
|
+
item: (idx: number) => result.results[idx] as Row | undefined,
|
|
80
45
|
}
|
|
81
46
|
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
47
|
+
return resultWithRows
|
|
48
|
+
|
|
49
|
+
// return Object.assign(result, {
|
|
50
|
+
// rows: {
|
|
51
|
+
// _array: result.results,
|
|
52
|
+
// length: result.results.length,
|
|
53
|
+
// item: (idx: number) => result.results[idx],
|
|
54
|
+
// },
|
|
55
|
+
// })
|
|
91
56
|
}
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isSimpleNullHandlingEnabled,
|
|
3
|
-
replaceWithNativeNullValue,
|
|
4
|
-
} from '../nullHandling'
|
|
5
1
|
import { HybridNitroSQLite } from '../nitro'
|
|
6
2
|
import {
|
|
7
3
|
queueOperationAsync,
|
|
8
4
|
startOperationSync,
|
|
9
5
|
throwIfDatabaseIsNotOpen,
|
|
10
6
|
} from '../DatabaseQueue'
|
|
11
|
-
import type {
|
|
12
|
-
NativeSQLiteQueryParams,
|
|
13
|
-
BatchQueryResult,
|
|
14
|
-
BatchQueryCommand,
|
|
15
|
-
NativeBatchQueryCommand,
|
|
16
|
-
} from '../types'
|
|
17
7
|
import NitroSQLiteError from '../NitroSQLiteError'
|
|
8
|
+
import type { BatchQueryCommand, BatchQueryResult } from '../types'
|
|
18
9
|
|
|
19
10
|
export function executeBatch(
|
|
20
11
|
dbName: string,
|
|
@@ -22,13 +13,9 @@ export function executeBatch(
|
|
|
22
13
|
): BatchQueryResult {
|
|
23
14
|
throwIfDatabaseIsNotOpen(dbName)
|
|
24
15
|
|
|
25
|
-
const transformedCommands = isSimpleNullHandlingEnabled()
|
|
26
|
-
? toNativeBatchQueryCommands(commands)
|
|
27
|
-
: (commands as NativeBatchQueryCommand[])
|
|
28
|
-
|
|
29
16
|
try {
|
|
30
17
|
return startOperationSync(dbName, () =>
|
|
31
|
-
HybridNitroSQLite.executeBatch(dbName,
|
|
18
|
+
HybridNitroSQLite.executeBatch(dbName, commands),
|
|
32
19
|
)
|
|
33
20
|
} catch (error) {
|
|
34
21
|
throw NitroSQLiteError.fromError(error)
|
|
@@ -41,36 +28,11 @@ export async function executeBatchAsync(
|
|
|
41
28
|
): Promise<BatchQueryResult> {
|
|
42
29
|
throwIfDatabaseIsNotOpen(dbName)
|
|
43
30
|
|
|
44
|
-
const transformedCommands = isSimpleNullHandlingEnabled()
|
|
45
|
-
? toNativeBatchQueryCommands(commands)
|
|
46
|
-
: (commands as NativeBatchQueryCommand[])
|
|
47
|
-
|
|
48
31
|
return queueOperationAsync(dbName, async () => {
|
|
49
32
|
try {
|
|
50
|
-
return await HybridNitroSQLite.executeBatchAsync(
|
|
51
|
-
dbName,
|
|
52
|
-
transformedCommands,
|
|
53
|
-
)
|
|
33
|
+
return await HybridNitroSQLite.executeBatchAsync(dbName, commands)
|
|
54
34
|
} catch (error) {
|
|
55
35
|
throw NitroSQLiteError.fromError(error)
|
|
56
36
|
}
|
|
57
37
|
})
|
|
58
38
|
}
|
|
59
|
-
|
|
60
|
-
function toNativeBatchQueryCommands(
|
|
61
|
-
commands: BatchQueryCommand[],
|
|
62
|
-
): NativeBatchQueryCommand[] {
|
|
63
|
-
return commands.map((command) => {
|
|
64
|
-
const transformedParams = command.params?.map((param) => {
|
|
65
|
-
if (Array.isArray(param)) {
|
|
66
|
-
return param.map((p) => replaceWithNativeNullValue(p))
|
|
67
|
-
}
|
|
68
|
-
return replaceWithNativeNullValue(param)
|
|
69
|
-
}) as NativeSQLiteQueryParams | NativeSQLiteQueryParams[]
|
|
70
|
-
|
|
71
|
-
return {
|
|
72
|
-
query: command.query,
|
|
73
|
-
params: transformedParams,
|
|
74
|
-
}
|
|
75
|
-
})
|
|
76
|
-
}
|
|
@@ -4,10 +4,10 @@ import type {
|
|
|
4
4
|
BatchQueryCommand,
|
|
5
5
|
NitroSQLiteConnection,
|
|
6
6
|
NitroSQLiteConnectionOptions,
|
|
7
|
-
QueryResult,
|
|
8
7
|
Transaction,
|
|
9
8
|
SQLiteQueryParams,
|
|
10
9
|
QueryResultRow,
|
|
10
|
+
QueryResult,
|
|
11
11
|
} from '../types'
|
|
12
12
|
import { execute, executeAsync } from './execute'
|
|
13
13
|
import { executeBatch, executeBatchAsync } from './executeBatch'
|