diff --git a/addon/mongocrypt.cc b/addon/mongocrypt.cc index 54ac834..1688b11 100644 --- a/addon/mongocrypt.cc +++ b/addon/mongocrypt.cc @@ -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. diff --git a/src/index.ts b/src/index.ts index 7355840..b47218b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,6 +40,8 @@ export interface MongoCryptConstructor { cryptSharedLibSearchPaths?: string[]; cryptSharedLibPath?: string; bypassQueryAnalysis?: boolean; + /** @experimental */ + rangeV2?: boolean; }): MongoCrypt; libmongocryptVersion: string; }