Skip to content

Commit

Permalink
Merge pull request #188 from sideshowcoder/documentation-meta-fix
Browse files Browse the repository at this point in the history
Documentation meta fix
  • Loading branch information
Neamar committed Nov 21, 2014
2 parents 9cb3f45 + 42df110 commit 60ba620
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,23 @@ all available options.

### Meta

Meta is an important concept in riak-js. It is a
*implementation-agnostic* object that carries all metadata associated to
a document, such as the bucket, key, vclock, links, and so on. It is meant to
be *recycled* — all properties that make sense to be updated for a
subsequent store operation can be modified and sent back. Any given properties
that aren't used by Riak are assumed to be custom metadata for Riak values.
This will become more clear as we go through the guide.
Meta is an important concept in riak-js. It is a *implementation-agnostic*
object that carries all metadata associated to a document, such as the bucket,
key, vclock, links, and so on. All properties that make sense to be sent back
for a subsequent store operation can be taken from a response meta object. You
need to make sure so not to send back invalid headers, a thing to watch out for
is, for example not to send back invalid `Content-Length` headers. Any given
properties that aren't used by Riak are assumed to be custom metadata for Riak
values. This will become more clear as we go through the guide.

An example `meta` object could look like:

{ bucket: 'riakjs_airlines'
, key: 'CPA'
, usermeta: { important: false }
, _type: 'application/json'
, binary: false
, links:
, links:
[ { tag: 'flight'
, key: 'CPA-729'
, bucket: 'riakjs_client_test_flights'
Expand Down Expand Up @@ -316,22 +317,22 @@ These commands (`getFile`, `saveFile`, `removeFile`) behave much like their
counterparts `get`, `save`, `remove`. Except they don't take a `bucket`
argument, internally reference the `luwak` raw resource, and always use
`responseEncoding = 'binary'` therefore returning `Buffer`s.

db.getFile('lowcost-pilot')

db.saveFile('lowcost-pilot', buffer)

db.removeFile('lowcost-pilot')

#### Ping

*Note: this command **only** takes an optional `callback`*
*Note: this command _only_ takes an optional `callback`*

db.ping()

#### Stats

*Note: this command **only** takes an optional `callback`*
*Note: this command _only_ takes an optional `callback`*

db.stats()

Expand Down

0 comments on commit 60ba620

Please sign in to comment.