-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-814: Change stream support for point-in-time pre and post-images #911
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
Conversation
include both a delta describing the changes to the document, as well as a | ||
copy of the entire document that was changed from some time after the change | ||
occurred. The following values are supported: | ||
Determines how the "fullDocument" response field will be populated for update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aleksandr-rudo: I realized after submitting #910 (comment) that I forgot to add docs to this PR. Please take a look when you get a chance.
Per the commit message, I intentionally omitted mention of the "default" and "off" constants, since they're redundant.
public const FULL_DOCUMENT_WHEN_AVAILABLE = 'whenAvailable'; | ||
public const FULL_DOCUMENT_REQUIRED = 'required'; | ||
|
||
public const FULL_DOCUMENT_BEFORE_CHANGE_OFF = 'off'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I don't expect applications to use this constant (doing so would be equivalent to leaving the option unspecified), and therefore did not document it; however, I still wanted to define the constant since the server does accept it and we use the value in corresponding spec tests.
bbebf2c
to
8e34a6a
Compare
Note: the CI build for this might include errors in existing change stream spec tests (see: #908 (comment)). If so, I'll create a new PHPLIB ticket to track that. Edit: Created PHPLIB-842. |
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection). Intentionally omits mention of FULL_DOCUMENT_DEFAULT (related to PHPLIB-808) and FULL_DOCUMENT_BEFORE_CHANGE_OFF constants, since those redundantly specified default behavior. Tests synced with mongodb/specifications@8978899
https://jira.mongodb.org/browse/PHPLIB-814
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection).
Depends on #908.