In the CouchDB GUI, when I add a new document the _id
field is the only field that appears by default. I must manually click "Add field" for each other field I want to add. This gets repetitive when I know every document in that particular database needs those fields. Is it possible to customize a database, so that when I create a new document in that database it has more than the _id
field by default?
相关问题
- How to purge CouchDB documents
- CouchDB's Linked Documents in a View
- CouchDB: how to use _revs_diff to get document rev
- How do I keep existing data in couchbase and only
- In CouchDB shows, what does 'this' refer t
相关文章
- How to get last created document in couchdb?
- CouchDB Java client
- Does using NoSQL make sense for a non-distributed
- Built in way to read couchdb document size?
- Document conflict error when updating a design doc
- Step by step instruction for secure replication?
- CouchDB proxy? Apache As a Reverse Proxy?
- Any way to limit access to CouchDB view when JSONP
I don't think it's possible to have predefined fields in CouchDB, I would probebly solve it by using a update function:
And call it with
curl -X PUT http://127.0.0.1:5984/db/_design/foo/_update/bar/_id
for all documents I create.