You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "janl (GitHub)" <gi...@apache.org> on 2018/08/23 12:18:09 UTC
[GitHub] [couchdb] janl commented on issue #1559: RFC: Sub-Document
Operations
Thanks for your additional input.
> _ Dynamic _rewrites:
unless this works already, there isn’t anything we’re going to change here
> _ Error handling: What happens if the targeted id/field is missing?
missing doc will cause a normal `404`, missing fields is an interesting one that is unspecified as of now, thanks for pointing that out.
```
GET /doc/_/foo/nonexistent -> 404
GET /doc/_/foo/nonexistent/bar/baz -> 404
```
```
DELETE /doc/_/nonexistent -> 404 | alternatively: 200 and return the old rev to signify no change, but the result is achieved. // maybe one of this is the default and one of this is available via a `?option=true|false`
DELETE /doc/_/foo/nonexistent/bar/baz -> same as before
```
```
PUT /doc/_/nonexistent -> 200 -> creates new field
PUT /doc/_/nonexistent/bar -> 200 -> creates new field and new sub field // this is analogous to how we create attachments and docs in one go // we could add an option `?fail_if_no_exist=true`
```
[ Full content available at: https://github.com/apache/couchdb/issues/1559 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org