jo / couchdb-push

Deploy CouchDB documents from directory, JSON or CommonJS module.
Other
40 stars 9 forks source link

Support _bulk_docs format support #24

Open tlvince opened 8 years ago

tlvince commented 8 years ago

Sometimes its more convenient to group documents as one JSON file in bulk docs format, e.g.:

{
  "docs": [
    {
      "_id": "london",
      "name": "London"
    },
    {
      "_id": "berlin",
      "name": "Berlin"
    }
  ]
}

Currently couchdb-{compile,push} operate at a per-document level, which can become unwieldy in some scenarios, for example DB seeding.

jo commented 8 years ago

The internal format might be best ewline-delimited JSON.