Skip to content

Commit 3d17011

Browse files
committed
PHPC-1484: Support for allowDiskUse on find operations
1 parent fcc053f commit 3d17011

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/MongoDB/Query.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ static bool php_phongo_query_init(php_phongo_query_t* intern, zval* filter, zval
288288
}
289289
}
290290

291+
PHONGO_QUERY_OPT_BOOL("allowDiskUse", options, "allowDiskUse")
291292
PHONGO_QUERY_OPT_BOOL("allowPartialResults", options, "allowPartialResults")
292293
else PHONGO_QUERY_OPT_BOOL("allowPartialResults", options, "partial");
293294
PHONGO_QUERY_OPT_BOOL("awaitData", options, "awaitData");

tests/query/query-ctor-002.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ MongoDB\Driver\Query construction with options
66
var_dump(new MongoDB\Driver\Query(
77
['x' => 1],
88
[
9+
'allowDiskUse' => false,
910
'allowPartialResults' => false,
1011
'awaitData' => false,
1112
'batchSize' => 10,
@@ -60,6 +61,8 @@ object(MongoDB\Driver\Query)#%d (%d) {
6061
}
6162
["options"]=>
6263
object(stdClass)#%d (%d) {
64+
["allowDiskUse"]=>
65+
bool(false)
6366
["allowPartialResults"]=>
6467
bool(false)
6568
["awaitData"]=>

0 commit comments

Comments
 (0)