Skip to content

PHPC-1484: Support for allowDiskUse on find operations #1099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/MongoDB/Query.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ static bool php_phongo_query_init(php_phongo_query_t* intern, zval* filter, zval
}
}

PHONGO_QUERY_OPT_BOOL("allowDiskUse", options, "allowDiskUse")
Copy link
Member

@jmikola jmikola Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is brought to you by PHONGO_QUERY_OPT_BOOL.

PHONGO_QUERY_OPT_BOOL("allowPartialResults", options, "allowPartialResults")
else PHONGO_QUERY_OPT_BOOL("allowPartialResults", options, "partial");
PHONGO_QUERY_OPT_BOOL("awaitData", options, "awaitData");
Expand Down
3 changes: 3 additions & 0 deletions tests/query/query-ctor-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ MongoDB\Driver\Query construction with options
var_dump(new MongoDB\Driver\Query(
['x' => 1],
[
'allowDiskUse' => false,
'allowPartialResults' => false,
'awaitData' => false,
'batchSize' => 10,
Expand Down Expand Up @@ -60,6 +61,8 @@ object(MongoDB\Driver\Query)#%d (%d) {
}
["options"]=>
object(stdClass)#%d (%d) {
["allowDiskUse"]=>
bool(false)
["allowPartialResults"]=>
bool(false)
["awaitData"]=>
Expand Down