Skip to content

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Aug 1, 2024

Adapted from the coroutine builders page, did some trimming and updating.

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-41161
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/kotlin-sync/DOCSP-41161-builders/builders/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Aug 1, 2024

Deploy Preview for docs-kotlin-sync ready!

Name Link
🔨 Latest commit 6c385f7
🔍 Latest deploy log https://app.netlify.com/sites/docs-kotlin-sync/deploys/66bcd237f7bf790008f3edda
😎 Deploy Preview https://deploy-preview-28--docs-kotlin-sync.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines 43 to 44
This section describes three methods of fetching the ``email`` field values of documents
in the ``users`` collection that meet the following criteria:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This section describes three methods of fetching the ``email`` field values of documents
in the ``users`` collection that meet the following criteria:
This section provides three equivalent ways to fetch the ``email`` field values of documents
in the ``users`` collection that meet the following criteria:

// start-find
val filter = Document("gender", "female").append("age", Document("\$gt", 29))
val projection = Document("_id", 0).append("email", 1)
val results = collection.find<Result>(filter).projection(projection)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
val results = collection.find<Result>(filter).projection(projection)
val results = collection.find<Email>(filter).projection(projection)

@mcmorisi mcmorisi requested a review from rustagir August 1, 2024 19:31
Copy link
Contributor

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

lgtm with some last comments

@mcmorisi mcmorisi requested review from a team and rozza and removed request for a team August 1, 2024 20:00
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

I left a couple of comments for consideration.

Overview
--------

This page describes how to implement the builders pattern in your code and describes
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This seems a little verbose. In short its about using builders to help build operations in a less verbose way than using Documents.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For further clarification, do you think the entire Overview section is too verbose?

Copy link
Member

Choose a reason for hiding this comment

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

Will add suggesions

.. _kotlin-sync-builders:

===============================
Implement Builders Code Pattern
Copy link
Member

Choose a reason for hiding this comment

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

Not sure this title makes sense - users aren't implementing builders we are consuming them.

@mcmorisi mcmorisi requested a review from rozza August 9, 2024 18:32
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

@mcmorisi I've added some suggestions which need some work but simplify the language around the builders / helpers.

Overview
--------

This page describes how to implement the builders pattern in your code and describes
Copy link
Member

Choose a reason for hiding this comment

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

Will add suggesions

@mcmorisi mcmorisi requested a review from rozza August 13, 2024 14:28
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

One nit then LGTM

Overview
--------

This page describes how to the various available builders in your code and describes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This page describes how to the various available builders in your code and describes
This page describes how to used the various available builders in your code and describes

@mcmorisi mcmorisi requested a review from rozza August 14, 2024 13:11
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmorisi mcmorisi merged commit 3897174 into mongodb:master Aug 14, 2024
5 of 6 checks passed
@mcmorisi mcmorisi deleted the DOCSP-41161-builders branch August 14, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants