<commit_before>leo_backend_db
==============

[![Build Status](https://secure.travis-ci.org/leo-project/leo_backend_db.png?branch=master)](http://travis-ci.org/leo-project/leo_backend_db)

* **leo_backend_db** is wrapper of local KVS and uses Basho bitcask, Basho eleveldb and Erlang ETS.
  * [bitcask](https://github.com/basho/bitcask)
  * [eleveldb](https://github.com/basho/eleveldb)
  * [Erlang ETS](http://www.erlang.org/doc/man/ets.html)

## Build Information
  
* "leo_backend_db" uses [rebar](https://github.com/basho/rebar) build system. Makefile so that simply running "make" at the top level should work.
* "leo_backend_db" requires Erlang R14B04 or later.

## Usage

```
$ git clone <EMAIL>:leo-project/leo_backend_db.git
$ cd leo_backend_db
$ make
$ mkdir test_db
$ erl -pa ebin deps/*/ebin
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit halfword] [smp:2:2] [async-threads:10] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> leo_backend_db_api:new(test_leveldb, 2, leveldb, "test_db"). # third argument can be one of 'bitcask', 'leveldb', and 'ets'.
ok
2> leo_backend_db_api:put(test_leveldb, <<"key1">>, <<"val1">>).
ok
3> leo_backend_db_api:get(test_leveldb, <<"key1">>).
{ok,<<"val1">>}
4> leo_backend_db_api:stop(Instance).
...
```

## Lincense

leo_backend_db's license is "Apache License Version 2.0".<commit_msg>Fix a mistake<commit_after>leo_backend_db
==============

[![Build Status](https://secure.travis-ci.org/leo-project/leo_backend_db.png?branch=master)](http://travis-ci.org/leo-project/leo_backend_db)

* **leo_backend_db** is wrapper of local KVS and uses Basho bitcask, Basho eleveldb and Erlang ETS.
  * [bitcask](https://github.com/basho/bitcask)
  * [eleveldb](https://github.com/basho/eleveldb)
  * [Erlang ETS](http://www.erlang.org/doc/man/ets.html)

## Build Information
  
* "leo_backend_db" uses [rebar](https://github.com/basho/rebar) build system. Makefile so that simply running "make" at the top level should work.
* "leo_backend_db" requires Erlang R14B04 or later.

## Usage

```
$ git clone <EMAIL>:leo-project/leo_backend_db.git
$ cd leo_backend_db
$ make
$ mkdir test_db
$ erl -pa ebin deps/*/ebin
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit halfword] [smp:2:2] [async-threads:10] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> leo_backend_db_api:new(test_leveldb, 2, leveldb, "test_db"). # third argument can be one of 'bitcask', 'leveldb', and 'ets'.
ok
2> leo_backend_db_api:put(test_leveldb, <<"key1">>, <<"val1">>).
ok
3> leo_backend_db_api:get(test_leveldb, <<"key1">>).
{ok,<<"val1">>}
4> leo_backend_db_api:stop(test_leveldb).
...
```

## Lincense

leo_backend_db's license is "Apache License Version 2.0".
{'fraction_non_alphanumeric': 0.17734724292101342, 'fraction_numerical': 0.02533532041728763, 'mean_word_length': 5.258741258741258, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 29, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '35200', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1105, 'n_words': 219}