2020
2121// Forward declaration of `ArrayBuffer` to properly resolve imports.
2222namespace NitroModules { class ArrayBuffer ; }
23+ // Forward declaration of `NativeSQLiteNullValue` to properly resolve imports.
24+ namespace margelo ::nitro::rnnitrosqlite { struct NativeSQLiteNullValue ; }
2325
2426#include < string>
2527#include < optional>
2628#include < variant>
2729#include < vector>
2830#include < NitroModules/ArrayBuffer.hpp>
31+ #include " NativeSQLiteNullValue.hpp"
2932
3033namespace margelo ::nitro::rnnitrosqlite {
3134
@@ -35,10 +38,10 @@ namespace margelo::nitro::rnnitrosqlite {
3538 struct BatchQueryCommand {
3639 public:
3740 std::string query SWIFT_PRIVATE;
38- std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>>>> params SWIFT_PRIVATE;
41+ std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>>>> params SWIFT_PRIVATE;
3942
4043 public:
41- explicit BatchQueryCommand (std::string query, std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>>>> params): query(query), params(params) {}
44+ explicit BatchQueryCommand (std::string query, std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>>>> params): query(query), params(params) {}
4245 };
4346
4447} // namespace margelo::nitro::rnnitrosqlite
@@ -54,13 +57,13 @@ namespace margelo::nitro {
5457 jsi::Object obj = arg.asObject (runtime);
5558 return BatchQueryCommand (
5659 JSIConverter<std::string>::fromJSI (runtime, obj.getProperty (runtime, " query" )),
57- JSIConverter<std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>>>>>::fromJSI (runtime, obj.getProperty (runtime, " params" ))
60+ JSIConverter<std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>>>>>::fromJSI (runtime, obj.getProperty (runtime, " params" ))
5861 );
5962 }
6063 static inline jsi::Value toJSI (jsi::Runtime& runtime, const BatchQueryCommand& arg) {
6164 jsi::Object obj (runtime);
6265 obj.setProperty (runtime, " query" , JSIConverter<std::string>::toJSI (runtime, arg.query ));
63- obj.setProperty (runtime, " params" , JSIConverter<std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>>>>>::toJSI (runtime, arg.params ));
66+ obj.setProperty (runtime, " params" , JSIConverter<std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>>>>>::toJSI (runtime, arg.params ));
6467 return obj;
6568 }
6669 static inline bool canConvert (jsi::Runtime& runtime, const jsi::Value& value) {
@@ -69,7 +72,7 @@ namespace margelo::nitro {
6972 }
7073 jsi::Object obj = value.getObject (runtime);
7174 if (!JSIConverter<std::string>::canConvert (runtime, obj.getProperty (runtime, " query" ))) return false ;
72- if (!JSIConverter<std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>>>>>>>::canConvert (runtime, obj.getProperty (runtime, " params" ))) return false ;
75+ if (!JSIConverter<std::optional<std::variant<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>, std::vector<std::vector<std::variant<std::string, double , bool , std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue >>>>>>::canConvert (runtime, obj.getProperty (runtime, " params" ))) return false ;
7376 return true ;
7477 }
7578 };
0 commit comments