gauc v0.17.0 Gauc.Client View Source

Couchbase Client

Link to this section Summary

Link to this section Functions

Link to this function add(handle, id, payload, opts \\ default_opts()) View Source
Link to this function append(handle, id, payload, opts \\ default_opts()) View Source

Returns list of handles (clients).

Returns {:ok, clients}.

Examples

iex(1)> {:ok, handle} = Gauc.Client.connect("couchbase://localhost/default", "Administrator", "Administrator")
{:ok, {2804783613, 1738359100}}

iex(2)> Gauc.Client.clients()
{:ok, [{{167799369, 732711453}, "couchbase://localhost/default"}]}
Link to this function connect(uri \\ "couchbase://localhost/default", username \\ "Administrator", password \\ "Administrator") View Source

Connects to couchbase server.

Returns {:ok, handle}.

Examples

iex> {:ok, handle} = Gauc.Client.connect("couchbase://localhost/default", "Administrator", "Administrator")
{:ok, {2804783613, 1738359100}}

Disconnects from couchbase server.

Returns {:ok, handle}.

Examples

iex(1)> {:ok, handle} = Gauc.Client.connect("couchbase://localhost/default", "Administrator", "Administrator")
{:ok, {2804783613, 1738359100}}

iex(2)> Gauc.Client.disconnect(handle)
{:ok, {2804783613, 1738359100}}
Link to this function prepend(handle, id, payload, opts \\ default_opts()) View Source
Link to this function query_view(handle, ddoc, name) View Source
Link to this function remove(handle, id, opts \\ default_opts()) View Source
Link to this function replace(handle, id, payload, opts \\ default_opts()) View Source
Link to this function set(handle, id, payload, opts \\ default_opts()) View Source
Link to this function store(op, handle, id, payload, opts \\ default_opts()) View Source
Link to this function upsert(handle, id, payload, opts \\ default_opts()) View Source