RiakEcto3 is an Ecto 3 Adapter for the Riak KV database (v 2.0 and upward), which represents structs as Riak CRDT Data Types.
- Structs are serialized as Riak CRDT Data Types.
Repo.get
andRepo.insert/update
Repo.delete
- Executing raw Solr queries
- Finding a key within a range of keys (which relies on Riak's Secondary Indexes feature).
- Setting up a Riak bucket type ('database')
- 'Tearing down' a Riak bucket type ('database'): It will only be flushed because Riak does not support the actual dropping of a bucket or bucket type.
- Support for associations
- and preloading them.
- Support for the Counter, Set and Flag CRDT datatypes.
- (Maybe!) a converter for the Ecto query syntax into the Solr query syntax.
- Support for the rest of Secondary Indexes, because these are deprecated and custom indexes cannot be created for CRDTs.
As soon as available in Hex, the package can be installed
by adding riak_ecto3
to your list of dependencies in mix.exs
:
def deps do
[
{:riak_ecto3, "~> 0.5.0"}
]
end
Documentation can be found at https://hexdocs.pm/riak_ecto3.
The tests expect Riak to be running in localhost at its default port (8087).
- Some of the features of RiakEcto3 require that searching is turned on, (the
search
setting inriak.conf
) - Some features (The ones that require secondary indexes) require that either the 'leveldb' or 'memory'-backend is used. (The
storage_backend
setting inriak.conf
) - Besides this, there are no restrictions when running the tests.