Skip to content

Commit

Permalink
Support approximateSize on db bigger than 4 GB (#777)
Browse files Browse the repository at this point in the history
By using napi_create_int64 instead of napi_create_int32.

Closes #776.
  • Loading branch information
larskuhtz committed Aug 1, 2021
1 parent 4659c8e commit 8740057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ struct ApproximateSizeWorker final : public PriorityWorker {
void HandleOKCallback () override {
napi_value argv[2];
napi_get_null(env_, &argv[0]);
napi_create_uint32(env_, (uint32_t)size_, &argv[1]);
napi_create_int64(env_, (uint64_t)size_, &argv[1]);
napi_value callback;
napi_get_reference_value(env_, callbackRef_, &callback);
CallFunction(env_, callback, 2, argv);
Expand Down

0 comments on commit 8740057

Please sign in to comment.