barrel_ex_http v0.3.0 BarrelEx.Document View Source

API for interacting with a BarrelDB document.

Link to this section Summary

Functions

Create a document doc in the barrel database db

Create a document doc in the barrel database db. Raises exception

Delete a document by doc_id

Delete a document by doc_id. Raises exception

Get all documents in a barrel named db

Get a document in a barrel named db with an id doc_id

Get all documents in a barrel named db. Raises exception

Get a document in a barrel named db with an id doc_id. Raises exception

Update a document by doc_id. Raises exception

Link to this section Functions

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

Create a document doc in the barrel database db.

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

Create a document doc in the barrel database db. Raises exception.

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

Delete a document by doc_id.

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

Delete a document by doc_id. Raises exception.

Get all documents in a barrel named db.

Link to this function get(db, options) View Source
get(String.t(), list()) :: {atom(), map()}
get(String.t(), map()) :: {atom(), map()}
get(String.t(), String.t()) :: {atom(), map()}

Get a document in a barrel named db with an id doc_id.

Get all documents in a barrel named db. Raises exception.

Link to this function get!(db, options) View Source
get!(String.t(), list()) :: map()
get!(String.t(), map()) :: map()
get!(String.t(), String.t()) :: {atom(), map()}

Get a document in a barrel named db with an id doc_id. Raises exception.

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

Update a document by doc_id.

Link to this function update!(db, doc_id, doc, e_tag \\ "", edit \\ false) View Source

Update a document by doc_id. Raises exception.