Permalink
Browse files

readme.md: reorder

  • Loading branch information...
1 parent 949ecdf commit a042258794b70993039a36b4c7ef9c61cb874bf8 @DTrejo DTrejo committed Jul 26, 2012
Showing with 28 additions and 28 deletions.
  1. +28 −28 README.md
View
@@ -119,34 +119,6 @@ Minimal parsing is done on the replies. Commands that return a single line repl
integer replies return JavaScript Numbers, "bulk" replies return node Buffers, and "multi bulk" replies return a
JavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys.
-### Commands with Optional and Keyword arguments
-
-This applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation.
-
-Example:
-```js
-var args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ];
-client.zadd(args, function (err, response) {
- if (err) throw err;
- console.log('added '+response+' items.');
-
- // -Infinity and +Infinity also work
- var args1 = [ 'myzset', '+inf', '-inf' ];
- client.zrevrangebyscore(args1, function (err, response) {
- if (err) throw err;
- console.log('example1', response);
- // write your code here
- });
-
- var max = 3, min = 1, offset = 1, count = 2;
- var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ];
- client.zrevrangebyscore(args2, function (err, response) {
- if (err) throw err;
- console.log('example2', response);
- // write your code here
- });
-});
-
# API
## Connection Events
@@ -604,6 +576,34 @@ Current delay in milliseconds before a connection retry will be attempted. This
Multiplier for future retry timeouts. This should be larger than 1 to add more time between retries.
Defaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc.
+### Commands with Optional and Keyword arguments
+
+This applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation.
+
+Example:
+```js
+var args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ];
+client.zadd(args, function (err, response) {
+ if (err) throw err;
+ console.log('added '+response+' items.');
+
+ // -Infinity and +Infinity also work
+ var args1 = [ 'myzset', '+inf', '-inf' ];
+ client.zrevrangebyscore(args1, function (err, response) {
+ if (err) throw err;
+ console.log('example1', response);
+ // write your code here
+ });
+
+ var max = 3, min = 1, offset = 1, count = 2;
+ var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ];
+ client.zrevrangebyscore(args2, function (err, response) {
+ if (err) throw err;
+ console.log('example2', response);
+ // write your code here
+ });
+});
+```
## TODO

0 comments on commit a042258

Please sign in to comment.