<commit_before>#riakdb

> Simple riak client

## Installation

```sheel
npm install riakdb
```

## Example

```javascript
var riakdb = require('riakdb');
var client = riakdb({
  nodes: [
    address: '127.0.0.1',
    port: 8087
  ]
});

client.connect();
client.keys({ bucket: 'examples' })
  .on('data', function (key) {
    console.log(key);
  })
  .once('end', function () {
    client.close();
  });

```

## Documentation

The documentation is separated intro three parts:

**[Connection](#Connection)**

Discusses how to setup and configure the riak connection pool and the
associated events.

**[High level interface](#High-level-interface)**

`riakdb` comes with two interfaces for communicating with Riak. Generally there
is no difference, however in some cases a convenient abstraction is put around
the underlying low level interace, to make it easier to use.

An example of this is the `.keys(request)` (stream of all keys in bucket). In
this case Riak returns a paginated stream, meaning that each item can contain
multiply keys. The high level interface performs a depagination such that each
item contain just a single key.

Because of the wast amount of features in Riak, some high level methods may
not support all the features of the corresponding low level method.

**[Low level interface](#Low-level-interface)**

To give better backward compatibility and ensure that all features in Riak
are supported a low level interface is also provided. This is a direct mapping
to the [Riak protocol buffer](http://docs.basho.com/riak/latest/dev/references/protocol-buffers/)
definition, with nothing on top. This uses the
[protocol-buffers](https://github.com/mafintosh/protocol-buffers) module, so
the encoding and decoding behaviour is defined by that.

### Connection

#### client = RiakClient(settings)

```javascript
var riakdb = require('riakdb');

var client = riakdb({<commit_msg>[doc] fix internal links<commit_after>#riakdb

> Simple riak client

## Installation

```sheel
npm install riakdb
```

## Example

```javascript
var riakdb = require('riakdb');
var client = riakdb({
  nodes: [
    address: '127.0.0.1',
    port: 8087
  ]
});

client.connect();
client.keys({ bucket: 'examples' })
  .on('data', function (key) {
    console.log(key);
  })
  .once('end', function () {
    client.close();
  });

```

## Documentation

The documentation is separated intro three parts:

**[Connection](#connection)**

Discusses how to setup and configure the Riak connection pool and the
associated events.

**[High level interface](#high-level-interface)**

`riakdb` comes with two interfaces for communicating with Riak. Generally there
is no difference, however in some cases a convenient abstraction is put around
the underlying low level interace, to make it easier to use.

An example of this is the `.keys(request)` (stream of all keys in bucket). In
this case Riak returns a paginated stream, meaning that each item can contain
multiply keys. The high level interface performs a depagination such that each
item contain just a single key.

Because of the wast amount of features in Riak, some high level methods may
not support all the features of the corresponding low level method.

**[Low level interface](#low-level-interface)**

To give better backward compatibility and ensure that all features in Riak
are supported a low level interface is also provided. This is a direct mapping
to the [Riak protocol buffer](http://docs.basho.com/riak/latest/dev/references/protocol-buffers/)
definition, with nothing on top. This uses the
[protocol-buffers](https://github.com/mafintosh/protocol-buffers) module, so
the encoding and decoding behaviour is defined by that.

### Connection

#### client = RiakClient(settings)

```javascript
var riakdb = require('riakdb');

var client = riakdb({
{'fraction_non_alphanumeric': 0.10238907849829351, 'fraction_numerical': 0.005250721974271462, 'mean_word_length': 4.5701754385964914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3559023', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1060, 'n_words': 458}