https://github.com/qqwy/elixir-riak_ecto3
RiakEcto3 is an Elixir Ecto 3 Adapter for the Riak KV database (For Riak KV v 2.0 and upward).
https://github.com/qqwy/elixir-riak_ecto3
crdt ecto ecto-adapter ecto3 elixir riak riak-kv
Last synced: 7 months ago
JSON representation
RiakEcto3 is an Elixir Ecto 3 Adapter for the Riak KV database (For Riak KV v 2.0 and upward).
- Host: GitHub
- URL: https://github.com/qqwy/elixir-riak_ecto3
- Owner: Qqwy
- License: mit
- Created: 2019-03-13T22:09:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-17T20:11:53.000Z (over 2 years ago)
- Last Synced: 2024-03-14T18:19:12.715Z (over 1 year ago)
- Topics: crdt, ecto, ecto-adapter, ecto3, elixir, riak, riak-kv
- Language: Elixir
- Homepage:
- Size: 60.5 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RiakEcto3
[](https://hex.pm/packages/riak_ecto3)
[](https://travis-ci.org/Qqwy/elixir_riak_ecto3)
[](http://inch-ci.org/github/qqwy/elixir_riak_ecto3)RiakEcto3 is an Ecto 3 Adapter for the Riak KV database (v 2.0 and upward), which represents structs as Riak CRDT Data Types.
## Features
- Structs are serialized as Riak CRDT Data Types.
- `Repo.get` and `Repo.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.## Planned Features
- 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.## (For now) deliberatly not planned as features
- Support for the rest of Secondary Indexes, because these are deprecated and custom indexes cannot be created for CRDTs.
## Installation
As soon as [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `riak_ecto3` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:riak_ecto3, "~> 0.5.0"}
]
end
```Documentation can be found at [https://hexdocs.pm/riak_ecto3](https://hexdocs.pm/riak_ecto3).
## Running Tests
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 in `riak.conf`)
- Some features (The ones that require secondary indexes) require that either the 'leveldb' or 'memory'-backend is used. (The `storage_backend` setting in `riak.conf`)
- Besides this, there are no restrictions when running the tests.