-
Notifications
You must be signed in to change notification settings - Fork 16
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
consistent "document" / "documents" fields for insert commands #141
Comments
@amorton I am not sure I follow the actual task here, currently in the implementation:
Is this how we want it to be or not? If so then I only need to double check the spec, driver and the postman, right? |
the original idea was to have them both be the same, which i guess would be "documents". And it would be the same for the find and findOneX calls as well so we always have the same document or documents. I think there are two outcomes:
Can you chat with the team in the USA including @kathirsvn and work out what is the best approach. The main thing is we are doing things deliberately. |
@kathirsvn Any chance we sync on this? |
Hi Ivan,
Sure, we can catch up today. I'll ping you in slack. Here's the current API
status with respect to this naming.
insert -> document
insertMany -> documents
find -> docs
findOne -> docs
findOneAndUpdate -> docs (returned after upserting a doc as required)
Thanks & Regards
Kathiresan Selvaraj
…On Mon, Apr 24, 2023 at 8:06 AM Ivan Senic ***@***.***> wrote:
@kathirsvn <https://github.com/kathirsvn> Any chance we sync on this?
—
Reply to this email directly, view it on GitHub
<#141 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AW5DDBFAQBFFL5CYDARZVL3XCZUC5ANCNFSM6AAAAAAU5RTPUY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@amorton We agreed to go for the option #2. So we will change the response data.
Kathir said we need to publish this in a release first and then he will do the driver updates. @maheshrajamani OK with you? |
@ivansenic That should be fine. |
@maheshrajamani @kathirsvn What are we doing with the delete and update commands, they are also returning data? should |
@ivansenic delete[One/Many] and update[One/Many] don't return any document in response. The document is returned for findOneAndUpdate, findOneAndReplace and findOneAndDelete. It will always be one document in response so has to be data.document. |
@maheshrajamani ok but operation does: |
boolean returnDocument flag will come in as false in case of delete[One/Many] and update[One/Many] |
@maheshrajamani thanks.. so basically I can always assume that it's a single response in those delete and update op pages? |
@ivansenic Yes it will be a single document. |
Ensure we have a consistent and document use of "document" / "documents" for the insertOne and insertMany commands - and this matches what we use in the response document.
ensure same in:
The text was updated successfully, but these errors were encountered: