Skip to content

Commit

Permalink
Specify default value for trimFactor range option
Browse files Browse the repository at this point in the history
This is temporary until sparsity and trimFactor are made optional prior to the GA release for range indexes (PHPC-2403)
  • Loading branch information
jmikola committed Jun 14, 2024
1 parent 23d7f51 commit ae351ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $encryptOpts = [
'algorithm' => MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE,
'queryType' => MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE,
'contentionFactor' => 0,
'rangeOpts' => ['min' => 0, 'max' => 200, 'sparsity' => 1],
'rangeOpts' => ['min' => 0, 'max' => 200, 'sparsity' => 1, 'trimFactor' => 1],
];

$expr = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $encryptOpts = [
'algorithm' => MongoDB\Driver\ClientEncryption::ALGORITHM_RANGE,
'queryType' => MongoDB\Driver\ClientEncryption::QUERY_TYPE_RANGE,
'contentionFactor' => 0,
'rangeOpts' => ['min' => 0, 'max' => 200, 'sparsity' => 1],
'rangeOpts' => ['min' => 0, 'max' => 200, 'sparsity' => 1, 'trimFactor' => 1],
];

echo throws(function() use ($clientEncryption, $encryptOpts) {
Expand Down

0 comments on commit ae351ed

Please sign in to comment.