Missing example for updating a document inside an array
Open
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 118
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
As reported in https://github.com/rethinkdb/rethinkdb/issues/6182
The example might look like this.
.update(lambda row: {
"array": row('array').map(lambda elem:
r.branch(
elem['name'] == 'Bob',
elem.merge({ "age": 27 }),
elem))})
Is there a better way to do this? Perhaps using change_at?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the proposed update example and the referenced RethinkDB issue #6182 first, then determine whether the example or change_at is the appropriate approach. Done means adding a decided, working example for updating a document inside an array to the documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100