Permalink
Browse files

Merge pull request #188 from sideshowcoder/documentation-meta-fix

Documentation meta fix
  • Loading branch information...
2 parents 9cb3f45 + 42df110 commit 60ba62023cce088cffe3c7b2b3bb4dd3b307774c @Neamar Neamar committed Nov 21, 2014
Showing with 14 additions and 13 deletions.
  1. +14 −13 index.md
View
@@ -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'
@@ -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()

0 comments on commit 60ba620

Please sign in to comment.