CouchFactory.Db

Set of helper functions to interact with Couchbeam.

The configration is set on config/config.exs and expected like:

config :couch_factory, CouchFactory.Db,
  host: "http://localhost:5984",
  db: "db_name",
  user: "username",
  password: "Apa$$w0rd"

CouchFactory will assume you have created the db and that couchdb is running.

Because Couchbeam doesn’t have a Hex package, it needs to be added as a git dependency to your project.

This module just implement the required functions for factory management, and are not to meant to be used directly by your app.

Summary

Functions

destroy(doc)
get(doc_id)
list_to_ejson(list)
reload(doc)
reset!()
save(doc)
value(doc, key)