File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
source/includes/qe-tutorials/php Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ // start-enable-range
4
+ $ encryptedFieldsMap = [
5
+ 'encryptedFields ' => [
6
+ 'fields ' => [
7
+ [
8
+ 'path ' => 'patientRecord.ssn ' ,
9
+ 'bsonType ' => 'string ' ,
10
+ 'queries ' => ['queryType ' => 'equality ' ],
11
+ 'keyId ' => null ,
12
+ ],
13
+ [
14
+ 'path ' => 'patientRecord.billing ' ,
15
+ 'bsonType ' => 'object ' ,
16
+ 'keyId ' => null ,
17
+ ],
18
+ [
19
+ 'path ' => 'patientRecord.billAmount ' ,
20
+ 'bsonType ' => 'int ' ,
21
+ 'queries ' => [
22
+ 'queryType ' => 'range ' ,
23
+ 'sparsity ' => 1 ,
24
+ 'trimFactor ' => 4 ,
25
+ 'min ' => 100 ,
26
+ 'max ' => 2000 ,
27
+ ],
28
+ 'keyId ' => null ,
29
+ ],
30
+ ],
31
+ ],
32
+ ];
33
+ // end-enable-range
34
+
35
+ // start-query-range
36
+ $ findResult = $ encryptedCollection ->findOne ([
37
+ 'patientRecord.billAmount ' => ['$gt ' => 1000 , '$lt ' => 2000 ],
38
+ ]);
39
+ print_r ($ findResult );
40
+ // end-query-range
You can’t perform that action at this time.
0 commit comments