From 3f29201702177782f425673e78f02d16f5426bf7 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan <piovesan.carlo@gmail.com> Date: Fri, 20 Sep 2024 15:21:10 +0200 Subject: [PATCH] Add explcit casts to Buffer registration Attempt at fixing https://github.com/duckdb/duckdb-node/issues/120 --- src/connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connection.cpp b/src/connection.cpp index d0e042f0..52ffbc08 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -487,7 +487,7 @@ Napi::Value Connection::RegisterBuffer(const Napi::CallbackInfo &info) { auto raw_ptr = reinterpret_cast<uint64_t>(arr.ArrayBuffer().Data()); auto length = (uint64_t)arr.ElementLength(); - arrow_scan_function += "{'ptr': " + std::to_string(raw_ptr) + ", 'size': " + std::to_string(length) + "},"; + arrow_scan_function += "{'ptr': " + std::to_string(raw_ptr) + "::UBIGINT, 'size': " + std::to_string(length) + "::UBIGINT},"; } arrow_scan_function += "])";