rethinkdb / rethinkdb/docs

Clarify Append Dissociated from DB

Open
#1,097 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
118
Forks
161
PR merge metrics
No merged PRs in 30d

Description

If I understand correctly, and from my testing, then...
https://www.rethinkdb.com/api/javascript/append/
...does nothing to manipulate the database at all.

This behaviour should be made explicit, as it is only implicitly demonstrated e.g. in the https://www.rethinkdb.com/api/javascript/update/ example, where the result of append has to be reassigned to the member field, but the dissociation between e.g. r.table("users")("arrayChild") and the backing database when using Array manipulation is not really stated in the documentation.

Does r.table("users")("arrayChild") sometimes map to the backing data structure, (e.g. it can sometimes be used to make changes in the database) and sometimes not? Alternatively is it always 'read only' until it is used as part of a merge specification to update().

Good to get this stated, and if there's a central place where it's stated there could be links from the pages of the relevant operations (e.g. append, insertAt etc)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the JavaScript API documentation for append and update, then check the related Array operations such as insertAt. Clarify that array expressions such as r.table("users")("arrayChild") do not directly modify the database, and link the explanation from the relevant operation pages. Done means the read-only behavior and reassignment required for update operations are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.