barrel_ex_http v0.2.1 BarrelEx.Document

API for interacting with a BarrelDB document.

Link to this section Summary

Functions

Create a new document doc in the database db. Returns also the response status

Create a new document doc in the database db

Delete a document doc in the database db. Returns also the response status

Delete a document doc in the database db

Get all documents from the database db, filtered by a map of options. Returns also the response status

Get all documents from the database db, filtered by a map of options or a list of options tuples

Get the document with a given doc_id from the database db, filtered by an optional list of options. Returns also the response status

Get the document with a given doc_id from the database db, filtered by an optional list of options

Check for differences in documents history in the database db. Returns also the response status

Check for differences in documents history in the database db

Update a document doc in the database db. Returns also the response status

Update a document doc in the database db

Link to this section Functions

Link to this function create(db, doc \\ %{})
create(String.t(), map() | none()) :: {atom(), map()}

Create a new document doc in the database db. Returns also the response status.

Link to this function create!(db, doc \\ %{})
create!(String.t(), map() | none()) :: map()

Create a new document doc in the database db.

Link to this function delete(db, doc_id, e_tag \\ "")
delete(String.t(), String.t(), String.t() | none()) :: {atom(), map()}

Delete a document doc in the database db. Returns also the response status.

Link to this function delete!(db, doc_id, e_tag \\ "")
delete!(String.t(), String.t(), String.t() | none()) :: map()

Delete a document doc in the database db.

Link to this function get(db, options \\ [])
get(String.t(), list() | map() | none()) :: {atom(), map()}

Get all documents from the database db, filtered by a map of options. Returns also the response status.

Link to this function get!(db, options \\ [])
get!(String.t(), list() | map() | none()) :: map()

Get all documents from the database db, filtered by a map of options or a list of options tuples.

Link to this function get_one(db, doc_id, options \\ [])
get_one(String.t(), String.t(), list() | none()) :: {atom(), map()}

Get the document with a given doc_id from the database db, filtered by an optional list of options. Returns also the response status.

Link to this function get_one!(db, doc_id, options \\ [])
get_one!(String.t(), String.t(), list() | none()) :: map()

Get the document with a given doc_id from the database db, filtered by an optional list of options.

Link to this function revsdiff(db, doc)
revsdiff(String.t(), map()) :: {atom(), map()}

Check for differences in documents history in the database db. Returns also the response status.

Link to this function revsdiff!(db, doc)
revsdiff!(String.t(), map()) :: map()

Check for differences in documents history in the database db.

Link to this function update(db, doc_id, doc, e_tag \\ "", edit \\ false)
update(String.t(), String.t(), map(), String.t(), boolean()) ::
  {atom(), map()}

Update a document doc in the database db. Returns also the response status.

Link to this function update!(db, doc_id, doc, e_tag \\ "", edit \\ false)
update!(String.t(), String.t(), map(), String.t(), boolean()) :: map()

Update a document doc in the database db.