Skip to content

Commit

Permalink
fix(NODE-6173): add rangeV2 feature flag toggle to Node.js bindings (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored May 23, 2024
1 parent 74eab4d commit e35bd59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon/mongocrypt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ MongoCrypt::MongoCrypt(const CallbackInfo& info)
mongocrypt_setopt_bypass_query_analysis(_mongo_crypt.get());
}

if (options.Get("rangeV2").ToBoolean()) {
mongocrypt_setopt_use_range_v2(_mongo_crypt.get());
}

mongocrypt_setopt_use_need_kms_credentials_state(_mongo_crypt.get());

// Initialize after all options are set.
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export interface MongoCryptConstructor {
cryptSharedLibSearchPaths?: string[];
cryptSharedLibPath?: string;
bypassQueryAnalysis?: boolean;
/** @experimental */
rangeV2?: boolean;
}): MongoCrypt;
libmongocryptVersion: string;
}
Expand Down

0 comments on commit e35bd59

Please sign in to comment.