Elixir Wrapper for Gauc - Rust Wrapper of Couchbase
- Elixir/Erlang friendly way to access Couchbase
- elixir - dynamic, functional language designed for building scalable and maintainable applications
- rust - systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety
If available in Hex, the package can be installed as:
- Add
gauc
to your list of dependencies inmix.exs
:
def deps do
[{:gauc, "~> x.x.x"}]
end
- Ensure
gauc
is started:
def application do
[applications: [:gauc]]
end
hexdocs: https://hexdocs.pm/gauc
config :gauc, Gauc,
url: "couchbase://localhost/default",
pool: [
size: 2,
max_overflow: 4
]
This section may be outdated, see official examples instead.
iex(1)> {:ok, handle} = Gauc.Client.connect("couchbase://localhost/default")
{:ok, {3138101329, 3409854531}}
iex(2)> {:ok, id, cas} = Gauc.Client.upsert(handle, "123", "{}")
{:ok, "123", 1507499098051444736}
iex(3)> {:ok, res} = Gauc.Client.get(handle, "123")
{:ok, "{}"}