diff --git a/cpp/utils.cpp b/cpp/utils.cpp index 303ba99..0fa9d6b 100644 --- a/cpp/utils.cpp +++ b/cpp/utils.cpp @@ -155,7 +155,7 @@ jsi::Value create_js_rows(jsi::Runtime &rt, const BridgeResult &status) { } jsi::Value -create_result(jsi::Runtime &rt, BridgeResult status, +create_result(jsi::Runtime &rt, const BridgeResult &status, std::vector *results, std::shared_ptr> metadata) { jsi::Object res = jsi::Object(rt); @@ -191,7 +191,7 @@ create_result(jsi::Runtime &rt, BridgeResult status, } jsi::Value -create_raw_result(jsi::Runtime &rt, BridgeResult status, +create_raw_result(jsi::Runtime &rt, const BridgeResult &status, const std::vector> *results) { size_t row_count = results->size(); jsi::Array res = jsi::Array(rt, row_count); @@ -296,14 +296,4 @@ int mkdir(std::string const &path) { return 0; } -std::vector parse_string_list(const std::string &str) { - std::vector result; - std::istringstream stream(str); - std::string token; - while (std::getline(stream, token, ',')) { - result.emplace_back(token); - } - return result; -} - } // namespace opsqlite diff --git a/cpp/utils.h b/cpp/utils.h index 951266b..adb4c64 100644 --- a/cpp/utils.h +++ b/cpp/utils.h @@ -26,14 +26,14 @@ std::vector to_variant_vec(jsi::Runtime &rt, jsi::Value const &xs); std::vector to_int_vec(jsi::Runtime &rt, jsi::Value const &xs); jsi::Value -create_result(jsi::Runtime &rt, BridgeResult status, +create_result(jsi::Runtime &rt, const BridgeResult &status, std::vector *results, std::shared_ptr> metadata); jsi::Value create_js_rows(jsi::Runtime &rt, const BridgeResult &status); jsi::Value -create_raw_result(jsi::Runtime &rt, BridgeResult status, +create_raw_result(jsi::Runtime &rt, const BridgeResult &status, const std::vector> *results); void to_batch_arguments(jsi::Runtime &rt, jsi::Array const &batch_params, @@ -47,6 +47,4 @@ bool folder_exists(const std::string &name); bool file_exists(const std::string &path); -std::vector parse_string_list(const std::string &str); - } // namespace opsqlite