Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

HHVM-161, HHVM-191: WriteResult should use libmongoc's public API #76

Merged
merged 2 commits into from
Mar 23, 2016

Conversation

derickr
Copy link
Contributor

@derickr derickr commented Mar 17, 2016

No description provided.

@derickr derickr force-pushed the HHVM-161-write-result-encapsulate-bson branch 2 times, most recently from 90539e8 to b6ef7bf Compare March 17, 2016 15:22
obj->o_set(s_nMatched, Variant(a[s_nMatched]), s_MongoDriverWriteResult_className);
obj->o_set(s_nRemoved, Variant(a[s_nRemoved]), s_MongoDriverWriteResult_className);
obj->o_set(s_nInserted, Variant(a[s_nInserted]), s_MongoDriverWriteResult_className);
obj->o_set(s_nModified, Variant(a[s_nModified]), s_MongoDriverWriteResult_className);
Copy link
Member

Choose a reason for hiding this comment

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

Will this fall back to null if the "nModified" field is missing in the BSON document?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I've just tested this by passing in s_info instead of s_nMatched (which doesn't exist), and the value turned into a NULL.

@derickr derickr force-pushed the HHVM-161-write-result-encapsulate-bson branch from b6ef7bf to 896ec02 Compare March 22, 2016 16:26
@jmikola
Copy link
Member

jmikola commented Mar 22, 2016

LGTM. I realized I didn't actually encounter this in PHPC yet because I've not started PHPC-628 :)

@derickr derickr merged commit 896ec02 into master Mar 23, 2016
derickr added a commit that referenced this pull request Mar 23, 2016
@derickr derickr deleted the HHVM-161-write-result-encapsulate-bson branch March 23, 2016 00:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants