leanback 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +10 -0
  3. data/Gemfile +5 -6
  4. data/Gemfile.lock +65 -14
  5. data/README.md +465 -33
  6. data/Rakefile +8 -17
  7. data/VERSION +1 -1
  8. data/leanback.gemspec +26 -85
  9. data/lib/leanback.rb +129 -587
  10. data/spec/leanback_spec.rb +356 -0
  11. metadata +40 -117
  12. data/Changelog.rdoc +0 -146
  13. data/documentation/static/2011/11/20/i-moved-leanback-documentation/index.html +0 -180
  14. data/documentation/static/2011/11/20/index.html +0 -146
  15. data/documentation/static/2011/11/index.html +0 -146
  16. data/documentation/static/2011/index.html +0 -146
  17. data/documentation/static/2013/06/02/index.html +0 -146
  18. data/documentation/static/2013/06/02/released-leanback-v0-3-4/index.html +0 -180
  19. data/documentation/static/2013/06/09/index.html +0 -146
  20. data/documentation/static/2013/06/09/released-leanback-v0-4-0/index.html +0 -179
  21. data/documentation/static/2013/06/index.html +0 -158
  22. data/documentation/static/2013/index.html +0 -158
  23. data/documentation/static/author/admin/index.html +0 -175
  24. data/documentation/static/basic-couchdb-operations/index.html +0 -259
  25. data/documentation/static/category/uncategorized/index.html +0 -170
  26. data/documentation/static/couchdb-configuration/index.html +0 -189
  27. data/documentation/static/couchdb-security/index.html +0 -218
  28. data/documentation/static/count-by-multiple-documents/index.html +0 -221
  29. data/documentation/static/count-documents-by-key/index.html +0 -177
  30. data/documentation/static/css/2c-l-fixed.css +0 -1
  31. data/documentation/static/css/2c-l-fixed.dev.css +0 -62
  32. data/documentation/static/css/2c-r-fixed.css +0 -1
  33. data/documentation/static/css/2c-r-fixed.dev.css +0 -60
  34. data/documentation/static/css/3c-c-fixed.css +0 -1
  35. data/documentation/static/css/3c-c-fixed.dev.css +0 -84
  36. data/documentation/static/css/3c-l-fixed.css +0 -1
  37. data/documentation/static/css/3c-l-fixed.dev.css +0 -61
  38. data/documentation/static/css/3c-r-fixed.css +0 -1
  39. data/documentation/static/css/3c-r-fixed.dev.css +0 -62
  40. data/documentation/static/css/holy-grail-fluid.css +0 -5
  41. data/documentation/static/css/plugins.css +0 -5
  42. data/documentation/static/css/print.css +0 -5
  43. data/documentation/static/css/screen.css +0 -1
  44. data/documentation/static/design-documents-and-permanent-views/index.html +0 -454
  45. data/documentation/static/error-handling/index.html +0 -157
  46. data/documentation/static/find-document-by-multiple-keys/index.html +0 -269
  47. data/documentation/static/find-documents-by-key/index.html +0 -243
  48. data/documentation/static/index.html +0 -161
  49. data/documentation/static/leanback/index.html +0 -130
  50. data/documentation/static/leanback/installation/index.html +0 -119
  51. data/documentation/static/setting-the-bind_address-port/index.html +0 -151
  52. data/documentation/static/style.css +0 -16
  53. data/spec/admin_party/database_spec.rb +0 -400
  54. data/spec/no_admin_party/cloudant_spec.rb +0 -365
  55. data/spec/no_admin_party/database_spec.rb +0 -491
  56. data/spec/no_admin_party/non_admin_user_spec.rb +0 -67
  57. data/test/helper.rb +0 -18
  58. data/test/main.rb +0 -295
  59. data/test/my_view.json +0 -8
  60. data/test/my_views.json +0 -8
  61. data/test/start.json +0 -8
  62. data/test/test_leanback.rb +0 -319
  63. data/test/view_age.json +0 -8
@@ -1 +0,0 @@
1
- #body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:right;width:620px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{float:left;width:300px}#secondary{clear:left;float:left;width:300px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both;overflow:hidden}
@@ -1,60 +0,0 @@
1
- /**
2
- * Two columns with content floated right.
3
- *
4
- * @since 0.6
5
- * @package Hybrid
6
- * @subpackage CSS
7
- */
8
-
9
- #body-container {
10
- overflow: hidden;
11
- width: 960px;
12
- margin: 0 auto;
13
- }
14
-
15
- #container {
16
- overflow: hidden;
17
- float: left;
18
- width: 960px;
19
- }
20
-
21
- .content {
22
- overflow: hidden;
23
- float: right;
24
- width: 620px;
25
- }
26
- .no-widgets .content, .no-default-widgets .content {
27
- width: 960px;
28
- }
29
-
30
- #primary {
31
- float: left;
32
- width: 300px;
33
- }
34
-
35
- #secondary {
36
- clear: left;
37
- float: left;
38
- width: 300px;
39
- }
40
-
41
- #subsidiary {
42
- overflow: hidden;
43
- }
44
-
45
- #subsidiary .widget {
46
- overflow: hidden;
47
- float: left;
48
- width: 300px;
49
- margin: 0 20px 0 0;
50
- }
51
-
52
- #footer-container {
53
- clear: both;
54
- overflow: hidden;
55
- }
56
-
57
- #footer {
58
- clear: both;
59
- overflow: hidden;
60
- }
@@ -1 +0,0 @@
1
- body{min-width:600px}#body-container{overflow:hidden;width:960px;margin:0 auto}#primary-menu{position:relative;z-index:100}#container{position:relative;clear:both;overflow:hidden;padding-left:240px; padding-right:240px; z-index:1}.no-widgets #container,.no-default-widgets #container{width:960px;padding-left:0;padding-right:0}.content,#primary,#secondary{position:relative;float:left;z-index:1}.content{width:100%}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{width:220px; right:240px; margin-left:-100%}#secondary{width:220px; margin-right:-240px; margin-left:20px}* html #secondary{left:240px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
@@ -1,84 +0,0 @@
1
- /**
2
- * Holy Grail Stylesheet.
3
- * Creates the Holy Grail (fixed width) of three-column layouts.
4
- * Primary / Content / Secondary
5
- *
6
- * @link http://www.alistapart.com/articles/holygrail
7
- * @author Matthew Levine
8
- *
9
- * @since 0.6
10
- * @package Hybrid
11
- * @subpackage CSS
12
- */
13
-
14
- body {
15
- min-width: 600px; /* 2x LC width + RC width */
16
- }
17
- #body-container {
18
- overflow: hidden;
19
- width: 960px;
20
- margin: 0 auto;
21
- }
22
- #primary-menu {
23
- position: relative;
24
- z-index: 100;
25
- }
26
- #container {
27
- position: relative;
28
- clear: both;
29
- overflow: hidden;
30
- padding-left: 240px; /* LC width */
31
- padding-right: 240px; /* RC width */
32
- z-index: 1;
33
- }
34
- .no-widgets #container, .no-default-widgets #container {
35
- width: 960px;
36
- padding-left: 0;
37
- padding-right: 0;
38
- }
39
- .content, #primary, #secondary {
40
- position: relative;
41
- float: left;
42
- z-index: 1;
43
- }
44
- .content {
45
- width: 100%;
46
- }
47
- .no-widgets .content, .no-default-widgets .content {
48
- width: 960px;
49
- }
50
- #primary {
51
- width: 220px; /* LC width */
52
- right: 240px; /* LC width */
53
- margin-left: -100%;
54
- }
55
- #secondary {
56
- width: 220px; /* RC width */
57
- margin-right: -240px; /* RC width */
58
- margin-left: 20px;
59
- }
60
-
61
- /*** IE6 Fix ***/
62
- * html #secondary {
63
- left: 240px; /* RC width */
64
- }
65
-
66
- #subsidiary {
67
- overflow: hidden;
68
- }
69
-
70
- #subsidiary .widget {
71
- overflow: hidden;
72
- float: left;
73
- width: 300px;
74
- margin: 0 20px 0 0;
75
- }
76
-
77
- #footer-container {
78
- clear: both;
79
- overflow: hidden;
80
- }
81
-
82
- #footer {
83
- clear: both;
84
- }
@@ -1 +0,0 @@
1
- #body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:left;width:520px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{overflow:hidden;float:right;width:190px}#secondary{overflow:hidden;float:right;width:190px;margin-right:20px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
@@ -1,61 +0,0 @@
1
- /**
2
- * Three columns with content floated left.
3
- *
4
- * @since 0.6
5
- * @package Hybrid
6
- * @subpackage CSS
7
- */
8
-
9
- #body-container {
10
- overflow: hidden;
11
- width: 960px;
12
- margin: 0 auto;
13
- }
14
-
15
- #container {
16
- overflow: hidden;
17
- float: left;
18
- width: 960px;
19
- }
20
-
21
- .content {
22
- overflow: hidden;
23
- float: left;
24
- width: 520px;
25
- }
26
- .no-widgets .content, .no-default-widgets .content {
27
- width: 960px;
28
- }
29
-
30
- #primary {
31
- overflow: hidden;
32
- float: right;
33
- width: 190px;
34
- }
35
-
36
- #secondary {
37
- overflow: hidden;
38
- float: right;
39
- width: 190px;
40
- margin-right: 20px;
41
- }
42
-
43
- #subsidiary {
44
- overflow: hidden;
45
- }
46
-
47
- #subsidiary .widget {
48
- overflow: hidden;
49
- float: left;
50
- width: 300px;
51
- margin: 0 20px 0 0;
52
- }
53
-
54
- #footer-container {
55
- clear: both;
56
- overflow: hidden;
57
- }
58
-
59
- #footer {
60
- clear: both;
61
- }
@@ -1 +0,0 @@
1
- #body-container{overflow:hidden;width:960px;margin:0 auto}#container{overflow:hidden;float:left;width:960px}.content{overflow:hidden;float:right;width:520px}.no-widgets .content,.no-default-widgets .content{width:960px}#primary{overflow:hidden;float:left;width:190px}#secondary{overflow:hidden;float:left;width:190px;margin-left:20px}#subsidiary{overflow:hidden}#subsidiary .widget{overflow:hidden;float:left;width:300px;margin:0 20px 0 0}#footer-container{clear:both;overflow:hidden}#footer{clear:both}
@@ -1,62 +0,0 @@
1
- /**
2
- * Three columns with content floated left.
3
- *
4
- * @since 0.6
5
- * @package Hybrid
6
- * @subpackage CSS
7
- */
8
-
9
- #body-container {
10
- overflow: hidden;
11
- width: 960px;
12
- margin: 0 auto;
13
- }
14
-
15
- #container {
16
- overflow: hidden;
17
- float: left;
18
- width: 960px;
19
- }
20
-
21
- .content {
22
- overflow: hidden;
23
- float: right;
24
- width: 520px;
25
- }
26
-
27
- .no-widgets .content, .no-default-widgets .content {
28
- width: 960px;
29
- }
30
-
31
- #primary {
32
- overflow: hidden;
33
- float: left;
34
- width: 190px;
35
- }
36
-
37
- #secondary {
38
- overflow: hidden;
39
- float: left;
40
- width: 190px;
41
- margin-left: 20px;
42
- }
43
-
44
- #subsidiary {
45
- overflow: hidden;
46
- }
47
-
48
- #subsidiary .widget {
49
- overflow: hidden;
50
- float: left;
51
- width: 300px;
52
- margin: 0 20px 0 0;
53
- }
54
-
55
- #footer-container {
56
- clear: both;
57
- overflow: hidden;
58
- }
59
-
60
- #footer {
61
- clear: both;
62
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated 0.9.0 - This file is for backwards compatibility with the Hybrid parent theme. It will
3
- * be removed in a future version.
4
- */
5
- body{min-width:600px}#container{overflow:hidden;padding-left:200px; padding-right:200px}.content,#primary,#secondary{position:relative;float:left;padding-bottom:20010px; margin-bottom:-20000px}.content{width:100%}#primary{width:200px; right:200px; margin-left:-100%}#secondary{width:200px; margin-right:-200px}#footer{clear:both}* html #secondary{left:200px}
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated 0.9.0 - This file is for backwards compatibility with the Hybrid parent theme. It will
3
- * be removed in a future version.
4
- */
5
- .wp-pagenavi .pages{margin:2px 3px 2px 0;font-style:italic}.wp-pagenavi .current{margin:2px;padding:1px 6px;font-weight:bold}.wp-pagenavi .extend{margin:2px}.wp-pagenavi a{margin:0 2px;padding:1px 6px;font-style:italic;border:1px solid #ccc}.WP-EmailIcon{padding:0;margin:0;border:none}.comment_license{font-style:italic}img#wpstats{overflow:hidden !important;width:0 !important;height:0 !important;padding:0 !important;margin:0 !important}.contact-form{margin-bottom:21px}.contact-form legend{display:none}.contact-form .form-input input{display:block;margin-bottom:6px;padding:3px 6px;width:300px}.contact-form label{font-size:.9em}.contact-form textarea{width:97%;margin-bottom:6px;padding:6px}.contact-form .form-option{margin-bottom:6px}.contact-form .button{width:100px;margin-right:9px;padding:6px 9px}.contact-form .button:hover{cursor:pointer}
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated 0.9.0 - This file is for backwards compatibility with the Hybrid parent theme. It will
3
- * be removed in a future version.
4
- */
5
- @import url('18px.css');body{font:11pt Cambria,Georgia,Times,'Times New Roman',serif}#body-container{margin:0 auto;padding:0}a,a:visited {color:#3C738C;text-decoration:none}h1,h2,h3,h4,h5,h6{font-family:Georgia,Times,"Times New Roman",serif;color:#444}.post ul{margin-left:27px}blockquote{overflow:hidden;font-style:italic;color:#444;margin:0 0 18px 0;padding:18px 18px 0 18px;border:1px solid #999;background:#ddd}blockquote em{font-style:normal}blockquote.pullquote{width:210px;margin-top:6px;margin-bottom:3px;padding:6px 9px;font-size:18px;text-align:center;color:#333;background:transparent;border-top:3px double #ccc;border-bottom:3px double #ccc}.pullquote p{margin:0}code{padding:0 3px;background:#eee}pre{overflow:auto;padding:9px;background:#eee;border:1px solid #ddd}pre code{padding:0;background:transparent}table{width:100%;background:#5F97B1;border:1px solid #eee}caption{font-size:.8em;font-style:italic;text-align:right;color:#666}td{padding:.3em;border:1px solid #35667c}tr{color:#fff;background:#3e7690}tr.alt,tr.even{background:#437f9b}th{padding:.3em;color:#fff;background:#274958;border:1px solid #35667c}td a,th a{font-weight:bold;color:#eee}.drop-cap{float:left;line-height:33px;margin-right:3px;font-size:42px;font-family:"Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Cambria,Georgia,serif;color:#666}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#EDF2F4;border:1px solid #adbabf}.left,.alignleft{float:left;margin:0 18px 0 0}.right,.alignright{float:right;margin:0 0 0 18px}.center,.aligncenter{display:block;margin:0 auto 18px auto}.block,.alignnone{display:block;margin:0 0 18px 0}.clear{clear:both}span.pullquote{float:none;margin:0}img,a img{padding:5px}.post img{max-width:99%}img.wp-smiley{max-height:12px;margin:0;padding:0;border:none}.wp-caption{padding:6px 1px 0 1px;background:#eee;border:1px solid #ddd;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.8em;color:#666}.wp-caption img{margin:0 auto;padding:0;border:1px solid #666}.gallery{display:block;text-align:center;margin-bottom:18px !important}.gallery img{border:1px solid #3c738c}.avatar{float:left;width:100px;height:100px;margin-right:18px;background:#3c738c;border:1px solid #999}.thumbnail{float:left;width:100px;height:100px;margin-right:18px;background:#3c738c}#container{margin:0;padding:0}#content{margin:0 auto;padding:0}a:link,a:visited{border-bottom:#999}.entry-title{margin:0 0 5px 0;padding:0}.byline{font-size:10pt;font-style:italic;padding-bottom:10px}.byline .separator{display:none}.entry-meta{font-size:10pt;font-style:italic;color:#333}#footer{padding-top:9px;font-size:9pt;color:#666;border-top:1px solid #eee}.edit{display:none}#footer .credit{display:none}.wp-pagenavi,.navigation-links{display:none}.breadcrumb{display:none}#header{display:none}#navigation{display:none}#primary{display:none}#secondary{display:none}#tertiary{display:none}#subsidiary{display:none}.utility{display:none}.widget{display:none}#comments-template{display:none}.query-count{display:none}
@@ -1 +0,0 @@
1
- .sticky,.bypostauthor{}body{font:normal normal normal 15px/21px Georgia,Times,"Times New Roman",serif;color:#000}#body-container{margin:90px auto 21px auto}a{color:#21759b;text-decoration:none}a:visited{color:#551a8b}a:hover,a:active{color:#d54e21;text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:Arial,Verdana,sans-serif;color:#000;font-weight:bold}h1{font-size:24px}h2{font-size:21px}h3{font-size:19px}h4{font-size:17px}h5{font-size:15px}h6{font-size:13px}ul{list-style:square}blockquote{font-style:italic;color:#555}blockquote blockquote{color:#777}blockquote em{font-style:normal}pre{padding:9px;background:#f9f9f9;border:1px solid #ccc}code{padding:0 3px;background:#eee}pre code{background:transparent}table{width:100%;border-collapse:separate;border-top:1px solid #ccc;border-left:1px solid #ccc}caption{font-size:.9em;font-style:italic;text-align:right}td,th{padding:3px 6px;border-bottom:1px solid #ccc;border-right:1px solid #ccc}th{background:#eee}.drop-cap{float:left;margin:3px 3px 0 0;font:normal normal normal 47px/35px "Warnock Pro","Goudy Old Style",Palatino,"Book Antiqua",Georgia,serif;color:#333}.note{padding:6px 9px;background:#eee;border:1px solid #ccc}.warning,.alert{padding:6px 9px;background:#fffbbc;border:1px solid #E6DB55}.error{padding:6px 9px;background:#ffebe8;border:1px solid #C00}.download{padding:6px 9px;background:#e7f7d3;border:1px solid #6c3}.breadcrumb{margin:0 0 30px 0;font-size:.9em;font-style:italic;color:#666}.breadcrumb a{color:#111;text-decoration:none}.breadcrumb a:hover{color:#d54e21;text-decoration:underline}.hentry img{max-width:610px;height:auto;padding:4px;border:1px solid #ccc}.no-widgets .hentry img{max-width:950px}img.alignleft,img.alignright{margin-bottom:10px}.thumbnail{float:left;width:100px;height:100px;margin:5px 15px 10px 0}img.wp-smiley{max-width:12px;padding:0;background:transparent;border:none}.wp-caption{max-width:616px;margin-top:6px;padding:6px 1px 3px 1px;border:1px solid #ccc;text-align:center}.wp-caption .wp-caption-text{margin:0;padding:0 5px;text-align:right;font-size:.9em;font-style:italic;color:#666}.wp-caption img{max-width:604px;margin:0 auto;padding:0;border:1px solid #666}.no-widgets .wp-caption{max-width:956px}.no-widgets .wp-caption img{max-width:946px}.gallery img{border:1px solid #ccc}.avatar{float:left;width:100px;height:100px;margin:5px 15px 0 0;padding:4px;border:1px solid #ccc}#header{margin:0 0 40px 0}#site-title{font:normal normal bold 35px/35px Arial,Verdana,sans-serif;margin:0 0 10px 0}#site-title a{color:#000}#site-description{font:normal normal normal 16px/20px Georgia,Times,"Times New Roman",serif;margin:0;color:#666}#primary-menu,#navigation{overflow:visible;height:34px;margin:0 0 60px 0;z-index:100}#primary-menu li,#page-nav li{margin-right:15px}#primary-menu li li,#page-nav li li{margin-right:0}#primary-menu li a,#page-nav li a{padding:8px 15px 8px 15px;color:#111;background:#fff;border:1px solid #ccc}#primary-menu li:hover ul,#primary-menu li.sfHover ul,#page-nav li:hover ul,#page-nav li.sfHover ul{top:32px}#primary-menu li li a,#page-nav li li a{border-top:none;margin-right:0}#primary-menu li ul,#page-nav li ul{background:#fff;border-top:1px solid #ccc}#primary-menu li li:hover ul,#primary-menu li li.sfHover ul,#primary-menu li li li:hover ul,#primary-menu li li li.sfHover ul,#page-nav li li:hover ul,#page-nav li li.sfHover ul,#page-nav li li li:hover ul,#page-nav li li li.sfHover ul {top:-1px}#primary-menu li li li,#page-nav li li li{margin-left:-1px}#container{margin-bottom:21px}.content{margin:0 0 21px 0}.no-widgets .content,.page-template-no-widgets .content{width:960px}.hentry{overflow:hidden;margin:0 0 40px 0}.singular .hentry{margin:0}.loop-meta{overflow:hidden;margin:0 0 40px 0}.loop-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif}.entry-title{font:normal normal bold 24px/24px Arial,Verdana,sans-serif;margin:0 0 12px 0}.archive .entry-title,.search .entry-title{font-size:21px;margin:0 0 5px 0}.singular-page .entry-title,.singular-attachment .entry-title{margin:0 0 21px 0}.entry-title a{color:#000}.byline{margin:0 0 30px 0;font-style:italic;color:#666}.archive .byline,.search .byline{margin:0 0 5px 0}.entry-content{margin:0 0 10px 0}.entry-meta{clear:both;font-style:italic;color:#666}p.page-links,.comment-pagination{clear:both}.comment-pagination{margin-bottom:21px}p.page-links a,.comment-pagination .page-numbers{margin:0 3px;padding:3px 9px 3px 9px;border:1px solid #ccc}.navigation-links{margin-bottom:21px;font-style:italic}.navigation-links .previous{float:left;max-width:50%}.navigation-links .next{float:right;max-width:50%;text-align:right}.navigation-attachment{overflow:hidden}.widget{overflow:hidden;margin:0 0 15px 0;color:#464646}.widget a{color:#464646;text-decoration:underline}.widget a:hover{color:#d54e21;text-decoration:none}.widget-title{font-size:18px;color:#111}#utility-before-content,#utility-after-content,#utility-after-page,#utility-after-single{margin:0 0 21px 0;padding:20px 20px 0 20px;border:1px solid #ccc}#comments-template{clear:both}.comments-header{font-size:1.2em}.comments-closed{font-style:italic}ol.comment-list,ol.comment-list ol.children{list-style:none;margin:0 0 21px 0}li.comment,li li li.comment,li li li li li.comment,li li li li li li li.comment,li li li li li li li li li.comment,li.pingback,li.trackback{overflow:hidden;margin:0 0 21px 0;padding:21px 21px 0 21px;background:#fff;border:1px solid #ccc}li li.comment,li li li li.comment,li li li li li li.comment,li li li li li li li li.comment,li li li li li li li li li li.comment{background:#f9f9f9}#comments-template .avatar{width:40px;height:40px;float:left;margin-right:15px;padding:0;border:1px solid #666}.comment-meta{margin:10px 0 21px 0;font-size:13px;color:#666}.comment-author{font-size:15px;color:#000}.comment-reply-link,.permalink,.comment-edit-link{font-style:italic;color:#666}.comment-text{clear:left;margin:0 15px}.text-input{display:block;padding:3px 6px;width:97%}#comments-template label{font-size:.9em}textarea{width:98%}#submit{display:inline-block;margin-right:15px;padding:7px 15px 8px 15px;background:#fff;border:1px solid #ccc}#submit:hover{cursor:pointer;background:#f9f9f9}#footer-container{clear:both;margin:0 0 21px 0}#subsidiary{margin:0 0 21px 0}#footer{font-style:italic;color:#444}#footer .copyright{display:inline;float:left;margin-right:9px}.content{float:left;width:620px}#primary{float:right;width:300px}#secondary{clear:right;float:right;width:300px}
@@ -1,454 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en-US">
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
- <title>Working with CouchDB views</title>
6
-
7
- <link rel="stylesheet" href="http://www.whisperservers.com/leanback/wp-content/themes/hybrid/style.css" type="text/css" media="all" />
8
- <link rel="profile" href="http://gmpg.org/xfn/11" />
9
- <link rel="pingback" href="http://www.whisperservers.com/leanback/xmlrpc.php" />
10
-
11
- <meta name="generator" content="WordPress 3.5.1 - really-static 0.5" />
12
- <meta name="template" content="Hybrid 1.0" />
13
- <meta name="robots" content="index,follow" />
14
- <meta name="author" content="admin" />
15
- <meta name="copyright" content="Copyright (c) November 2011" />
16
- <meta name="revised" content="Sunday, June 2nd, 2013, 6:08 pm" />
17
- <link rel="alternate" type="application/rss+xml" title="Leanback &raquo; Feed" href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/feed/" />
18
-
19
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>
20
- <link rel='prev' title='Find documents by key' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-documents-by-key/' />
21
- <link rel='next' title='Error handling' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/error-handling/' />
22
- <link rel='canonical' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/design-documents-and-permanent-views/' />
23
-
24
- <link rel="stylesheet" href="http://www.whisperservers.com/leanback/wp-content/plugins/wp-syntax/wp-syntax.css" type="text/css" media="screen" />
25
-
26
- </head>
27
-
28
- <body class="wordpress ltr en_US parent-theme y2013 m06 d09 h16 sunday logged-out singular singular-page singular-page-43 page-template-default page-43 primary-active secondary-inactive subsidiary-inactive">
29
-
30
-
31
- <div id="body-container">
32
-
33
-
34
- <div id="header-container">
35
-
36
- <div id="header">
37
-
38
- <div id="site-title"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/" title="Leanback" rel="home"><span>Leanback</span></a></div>
39
- <div id="site-description"><span>Simple Ruby interface to CouchDB</span></div>
40
-
41
- </div><!-- #header -->
42
-
43
- </div><!-- #header-container -->
44
-
45
-
46
- <div id="container">
47
-
48
-
49
- <div id="content" class="hfeed content">
50
-
51
- <div class="breadcrumb breadcrumbs"><div class="breadcrumb-trail"><span class="trail-before"><span class="breadcrumb-title">Browse:</span></span> <a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/" title="Leanback" rel="home" class="trail-begin">Home</a> <span class="sep">/</span> <span class="trail-end">Working with CouchDB views</span></div></div>
52
-
53
- <div id="post-43" class="hentry page publish post-1 odd author-admin">
54
-
55
- <h1 class="page-title entry-title"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/design-documents-and-permanent-views/" title="Working with CouchDB views" rel="bookmark">Working with CouchDB views</a></h1>
56
- <div class="entry-content">
57
- <p>First we login to CouchDB and generate the auth_session token for making requests.</p>
58
-
59
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">hash = Couchdb.<span style="color:#9900CC;">login</span><span style="color:#006600; font-weight:bold;">&#40;</span>username = <span style="color:#996600;">'samson'</span>,password =<span style="color:#996600;">'sam123'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
60
- auth_session = hash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;AuthSession&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span></pre></div></div>
61
-
62
- <p><strong>To Query a permanent view</strong></p>
63
-
64
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
65
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
66
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_female_contacts'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
67
- &nbsp;
68
- Couchdb.<span style="color:#9900CC;">find</span> view,auth_session
69
- &nbsp;
70
- <span style="color:#008000; font-style:italic;"># =&gt; [{&quot;_id&quot;=&gt;&quot;Mary&quot;, &quot;_rev&quot;=&gt;&quot;5-bfcd67fd17dbb6a875af8f6dc497b15f&quot;, &quot;firstname&quot;=&gt;&quot;Mary&quot;, &quot;lastname&quot;=&gt;&quot;smith&quot;, </span>
71
- <span style="color:#008000; font-style:italic;"># &quot;phone&quot;=&gt;&quot;212-234-1234&quot;, &quot;email&quot;=&gt;&quot;mary@mail.com&quot;, &quot;gender&quot;=&gt;&quot;female&quot;}, </span>
72
- <span style="color:#008000; font-style:italic;"># {&quot;_id&quot;=&gt;&quot;Nancy&quot;, &quot;_rev&quot;=&gt;&quot;1-d15a83d2a23b495c19df2595b636ecc8&quot;, &quot;firstname&quot;=&gt;&quot;Nancy&quot;, &quot;lastname&quot;=&gt;&quot;Lee&quot;, </span>
73
- <span style="color:#008000; font-style:italic;"># &quot;phone&quot;=&gt;&quot;347-808-3734&quot;, &quot;email&quot;=&gt;&quot;nancy@mail.com&quot;, &quot;gender&quot;=&gt;&quot;female&quot;}]</span></pre></div></div>
74
-
75
- <p>This is similar to sending a</p>
76
-
77
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/[database]/_design/[design_doc]/_view/[view_name]</pre></div></div>
78
-
79
- <p>For the above example</p>
80
-
81
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/contacts/_design/my_views/_view/get_female_contacts</pre></div></div>
82
-
83
- <p>Leanback parses the native JSON results to return only the data values.</p>
84
- <p><strong>Query a view by key</strong></p>
85
-
86
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
87
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
88
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
89
- age = <span style="color:#996600;">&quot;36&quot;</span>
90
- Couchdb.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,auth_session,key = age<span style="color:#006600; font-weight:bold;">&#41;</span>
91
- &nbsp;
92
- <span style="color:#008000; font-style:italic;"># =&gt; [{&quot;_id&quot;=&gt;&quot;Nancy&quot;, &quot;_rev&quot;=&gt;&quot;2-4404d0a5a1a3dff103fd46faf1e46c30&quot;, &quot;firstname&quot;=&gt;&quot;Nancy&quot;, &quot;lastname&quot;=&gt;&quot;Lee&quot;, </span>
93
- <span style="color:#008000; font-style:italic;"># &quot;phone&quot;=&gt;&quot;347-808-3734&quot;, &quot;email&quot;=&gt;&quot;nancy@mail.com&quot;, &quot;gender&quot;=&gt;&quot;female&quot;, &quot;age&quot;=&gt;&quot;36&quot;}]</span></pre></div></div>
94
-
95
- <p>The above example will return all contacts with age = 36.</p>
96
- <p>This is similar to sending a</p>
97
-
98
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/[database]/_design/[design_doc]/_view/[view_name]?key=&quot;searchterm&quot;</pre></div></div>
99
-
100
- <p>For the above example</p>
101
-
102
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/contacts/_design/the_view/_view/age?key=&quot;36&quot;</pre></div></div>
103
-
104
- <p>Leanback parses the native JSON results to return only the data values.</p>
105
- <p>If you are running an admin party (with no admins in CouchDB), pass the auth_session as an empty string.</p>
106
-
107
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
108
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
109
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
110
- age = <span style="color:#996600;">&quot;36&quot;</span>
111
- Couchdb.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,<span style="color:#996600;">&quot;&quot;</span>,key = age<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
112
-
113
- <p><strong>Query Options</strong><br />
114
- A set of options can be used to manipulate the query results.</p>
115
- <p><strong>limit</strong><br />
116
- Example to limit the number of results from a query:</p>
117
-
118
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
119
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
120
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
121
- age = <span style="color:#996600;">&quot;36&quot;</span>
122
- Couchdb.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,auth_session,key = age,options = <span style="color:#006600; font-weight:bold;">&#123;</span>:limit <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">10</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
123
-
124
- <p>This will limit the results to 10.</p>
125
-
126
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
127
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
128
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_female_contacts'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
129
- &nbsp;
130
- Couchdb.<span style="color:#9900CC;">find</span> view,auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>, options = <span style="color:#006600; font-weight:bold;">&#123;</span>:limit <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">12</span><span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>
131
-
132
- <p>This will limit the results to 12. </p>
133
- <p>This does the GET request below:</p>
134
-
135
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET /contacts/_design/my_views/_view/get_female_contacts?limit=12</pre></div></div>
136
-
137
- <p><strong>skip</strong><br />
138
- To skip documents:</p>
139
-
140
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
141
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
142
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_female_contacts'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
143
- &nbsp;
144
- Couchdb.<span style="color:#9900CC;">find</span> view,auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>, options = <span style="color:#006600; font-weight:bold;">&#123;</span>:skip <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">20</span><span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>
145
-
146
- <p>This will skip the first 20 documents. This does the GET request below:</p>
147
-
148
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET /contacts/_design/my_views/_view/get_female_contacts?skip=20</pre></div></div>
149
-
150
- <p>Note that skip is considered a relatively expensive operation for CouchDB.</p>
151
- <p><strong>descending</strong><br />
152
- To return the view results in descending order (couchDB returns results in ascending order by default.) use options={:descending => true}<br />
153
- Example:</p>
154
-
155
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
156
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
157
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_female_contacts'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
158
- &nbsp;
159
- Couchdb.<span style="color:#9900CC;">find</span> view,auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>, options = <span style="color:#006600; font-weight:bold;">&#123;</span>:descending <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>
160
-
161
- <p>This will be a GET request:</p>
162
-
163
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET /contacts/_design/my_views/_view/get_female_contacts?descending=true</pre></div></div>
164
-
165
- <p><strong> startkey &#038; endkey</strong><br />
166
- To return a range of results using couchDB&#8217;s startkey &#038; endkey, for example to query an employee database for employees within a salary range:</p>
167
-
168
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;employees&quot;</span>,
169
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'salary_finder'</span>,
170
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'find_by_salary'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
171
- options = <span style="color:#006600; font-weight:bold;">&#123;</span>:startkey <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;53000&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:endkey</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;99000&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
172
- Couchdb.<span style="color:#9900CC;">find</span> view, auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>, options</pre></div></div>
173
-
174
- <p>This will return all employees within the salary range of 53000 to 99000.<br />
175
- This does a GET request to:</p>
176
-
177
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET /employees/_design/salary_finder/_view/find_by_salary?startkey=53000&amp;endkey=99000</pre></div></div>
178
-
179
- <p>To return all employees with salary 99000 or less:</p>
180
-
181
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;employees&quot;</span>,
182
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'salary_finder'</span>,
183
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'find_by_salary'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
184
- options = <span style="color:#006600; font-weight:bold;">&#123;</span>:endkey <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;99000&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
185
- Couchdb.<span style="color:#9900CC;">find</span> view, auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>, options</pre></div></div>
186
-
187
- <p>This does a GET request to:</p>
188
-
189
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET /employees/_design/salary_finder/_view/find_by_salary?endkey=99000</pre></div></div>
190
-
191
- <p>To query with a complex startkey and endkey, for example to query an employee database for all male employees that are 28 years old:</p>
192
-
193
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;employees&quot;</span>,
194
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
195
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age_gender'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
196
- &nbsp;
197
- options = <span style="color:#006600; font-weight:bold;">&#123;</span>:startkey <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;28&quot;</span>,<span style="color:#996600;">&quot;male&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:endkey</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;28&quot;</span>,<span style="color:#996600;">&quot;male&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
198
- Couchdb.<span style="color:#9900CC;">find</span> view, auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>,options</pre></div></div>
199
-
200
- <p>The design document for the above query will look something like this:</p>
201
-
202
- <div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
203
- <span style="color: #3366CC;">&quot;language&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">,</span>
204
- <span style="color: #3366CC;">&quot;views&quot;</span> <span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
205
- <span style="color: #3366CC;">&quot;age_gender&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
206
- <span style="color: #3366CC;">&quot;map&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;function(doc){ if(doc.age &amp;&amp; doc.gender) emit([doc.age, doc.gender],doc); }&quot;</span>
207
- <span style="color: #009900;">&#125;</span>
208
- <span style="color: #009900;">&#125;</span>
209
- <span style="color: #009900;">&#125;</span></pre></div></div>
210
-
211
- <p>Just like a GET request query directly to couchDB, the options could be combined in any order.<br />
212
- This example below:</p>
213
-
214
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;employees&quot;</span>,
215
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'salary_finder'</span>,
216
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'find_by_salary'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
217
- &nbsp;
218
- options = <span style="color:#006600; font-weight:bold;">&#123;</span>:startkey <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;53000&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:endkey</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;99000&quot;</span>,:limit <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">20</span><span style="color:#006600; font-weight:bold;">&#125;</span>
219
- Couchdb.<span style="color:#9900CC;">find</span> view, auth_session,key=<span style="color:#0000FF; font-weight:bold;">nil</span>,options</pre></div></div>
220
-
221
- <p>returns the first 20 employees within the salary range 53000 to 99000.</p>
222
- <p><strong>Create a design document with permanent views:</strong></p>
223
- <p>First define the views in a JSON file</p>
224
-
225
- <div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//my_views.json</span>
226
- <span style="color: #009900;">&#123;</span>
227
- <span style="color: #3366CC;">&quot;language&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">,</span>
228
- <span style="color: #3366CC;">&quot;views&quot;</span> <span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
229
- <span style="color: #3366CC;">&quot;get_email&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
230
- <span style="color: #3366CC;">&quot;map&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;function(doc){
231
- if(doc.lastname &amp;&amp; doc.email)
232
- emit(doc.id,{Firstname: doc.firstname, Lastname: doc.lastname, Email: doc.email});
233
- }&quot;</span>
234
- <span style="color: #009900;">&#125;</span>
235
- <span style="color: #009900;">&#125;</span>
236
- <span style="color: #009900;">&#125;</span></pre></div></div>
237
-
238
- <p>Now create the design document and add the json file</p>
239
-
240
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">doc = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
241
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'more_views'</span>,
242
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/my_views.json'</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
243
- &nbsp;
244
- Couchdb.<span style="color:#9900CC;">create_design</span> doc,auth_session
245
- &nbsp;
246
- <span style="color:#008000; font-style:italic;"># =&gt; {&quot;ok&quot;=&gt;true, </span>
247
- <span style="color:#008000; font-style:italic;"># &quot;id&quot;=&gt;&quot;_design/more_views&quot;, </span>
248
- <span style="color:#008000; font-style:italic;"># &quot;rev&quot;=&gt;&quot;1-d67ae97ff03a98f68ddc300bf9ae5048&quot;}</span></pre></div></div>
249
-
250
- <p>To query the view</p>
251
-
252
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
253
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'more_views'</span>,
254
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_email'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
255
- &nbsp;
256
- Couchdb.<span style="color:#9900CC;">find</span> view,auth_session
257
- &nbsp;
258
- <span style="color:#008000; font-style:italic;"># =&gt; [{&quot;Firstname&quot;=&gt;&quot;Nancy&quot;, &quot;Lastname&quot;=&gt;&quot;Lee&quot;, &quot;Email&quot;=&gt;&quot;nancy@mail.com&quot;}, </span>
259
- <span style="color:#008000; font-style:italic;"># {&quot;Firstname&quot;=&gt;&quot;john&quot;, &quot;Lastname&quot;=&gt;&quot;smith&quot;, &quot;Email&quot;=&gt;&quot;john@mail.com&quot;}]</span></pre></div></div>
260
-
261
- <p><strong>Query a View and Create it on the fly if it doesn’t already exist</strong></p>
262
- <p>Let’s say we want to query a view, and create it on the fly if it doesn’t already exist, and still return the values. In this example we will query a view called get_emails view (which returns emails of all contacts), if this view doesn’t already exist it will be added to the database.</p>
263
-
264
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> get_emails
265
- view = <span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
266
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
267
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_emails'</span>,
268
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/my_views.json'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
269
- &nbsp;
270
- Couchdb.<span style="color:#9900CC;">find_on_fly</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
271
- <span style="color:#9966CC; font-weight:bold;">end</span>
272
- &nbsp;
273
- email_list = get_emails<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
274
- <span style="color:#CC0066; font-weight:bold;">puts</span> email_list.<span style="color:#9900CC;">inspect</span>
275
- &nbsp;
276
- <span style="color:#008000; font-style:italic;"># =&gt; [{&quot;Name&quot;=&gt;&quot;Nancy&quot;, &quot;Email&quot;=&gt;&quot;nancy@mail.com&quot;}, {&quot;Name&quot;=&gt;&quot;John&quot;, &quot;Email&quot;=&gt;&quot;john@mail.com&quot;}]</span></pre></div></div>
277
-
278
- <p>In get_emails(),</p>
279
-
280
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_on_fly</span><span style="color:#006600; font-weight:bold;">&#40;</span>view<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
281
-
282
- <p>sends a request to the design_document (my_views) and view (get_emails). If this view is found in the database, it returns an Array with the name and email of all contacts:</p>
283
-
284
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#=&gt; [{&quot;Name&quot;=&gt;&quot;Nancy&quot;, &quot;Email&quot;=&gt;&quot;nancy@mail.com&quot;}, {&quot;Name&quot;=&gt;&quot;John&quot;, &quot;Email&quot;=&gt;&quot;john@mail.com&quot;}]</span></pre></div></div>
285
-
286
- <p>if the design document and view doesn’t already exist, it creates it and adds it to the database using the json document</p>
287
-
288
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/my_views.json'</span></pre></div></div>
289
-
290
- <p>next it sends a request for the view again and then it returns the email list.</p>
291
- <p>So the first time the get_emails() method is called, the view will be created on the fly and added to the database. Future calls to get_email would simply return the values from the view.</p>
292
- <p>Source for the get_emails view:</p>
293
-
294
- <div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//my_views.json</span>
295
- <span style="color: #009900;">&#123;</span>
296
- <span style="color: #3366CC;">&quot;language&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">,</span>
297
- <span style="color: #3366CC;">&quot;views&quot;</span> <span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
298
- <span style="color: #3366CC;">&quot;get_emails&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
299
- <span style="color: #3366CC;">&quot;map&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;function(doc){
300
- if(doc.firstname &amp;&amp; doc.email)
301
- emit(doc.id,{Name: doc.firstname, Email: doc.email});
302
- }&quot;</span>
303
- <span style="color: #009900;">&#125;</span>
304
- <span style="color: #009900;">&#125;</span>
305
- <span style="color: #009900;">&#125;</span></pre></div></div>
306
-
307
- <p>You can also query a permanent view with a key and create it on the fly, if it doesn’t already exist. Let’s say we want to view all contacts with age = “36”, and we already defined the view in a json file (view_age.json).</p>
308
-
309
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
310
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
311
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span>,
312
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/view_age.json'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
313
- &nbsp;
314
- age = <span style="color:#996600;">'36'</span>
315
- Couchdb.<span style="color:#9900CC;">find_on_fly</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,auth_session,key = age<span style="color:#006600; font-weight:bold;">&#41;</span>
316
- &nbsp;
317
- <span style="color:#008000; font-style:italic;">#=&gt; [{&quot;_id&quot;=&gt;&quot;Nancy&quot;, &quot;_rev&quot;=&gt;&quot;2-4404d0a5a1a3dff103fd46faf1e46c30&quot;, &quot;firstname&quot;=&gt;&quot;Nancy&quot;, &quot;lastname&quot;=&gt;&quot;Lee&quot;, </span>
318
- <span style="color:#008000; font-style:italic;"># &quot;phone&quot;=&gt;&quot;347-808-3734&quot;, &quot;email&quot;=&gt;&quot;nancy@mail.com&quot;, &quot;gender&quot;=&gt;&quot;female&quot;, &quot;age&quot;=&gt;&quot;36&quot;}]</span></pre></div></div>
319
-
320
- <p>The above example will query the design_document (the_view) and view (age) in the database (contacts), using the key (age). If the view doesn’t exist it will be created from the json document (view.age.json). And then return the values from the view.</p>
321
- <p>This is similar to sending a</p>
322
-
323
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/contacts/_design/the_view/_view/age?key=&quot;36&quot;</pre></div></div>
324
-
325
- <p>The view is generated from the source code:</p>
326
-
327
- <div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//view_age.json</span>
328
- <span style="color: #009900;">&#123;</span>
329
- <span style="color: #3366CC;">&quot;language&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">,</span>
330
- <span style="color: #3366CC;">&quot;views&quot;</span> <span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
331
- <span style="color: #3366CC;">&quot;age&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
332
- <span style="color: #3366CC;">&quot;map&quot;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;function(doc){
333
- if(doc.age)
334
- emit(doc.age,doc);
335
- }&quot;</span>
336
- <span style="color: #009900;">&#125;</span>
337
- <span style="color: #009900;">&#125;</span>
338
- <span style="color: #009900;">&#125;</span></pre></div></div>
339
-
340
- <p>If you are running an admin party (i.e no admins users on CouchDB), simply leave out auth_session parameter in the method.<br />
341
- Some examples:</p>
342
-
343
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
344
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
345
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_female_contacts'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
346
- &nbsp;
347
- Couchdb.<span style="color:#9900CC;">find</span> view</pre></div></div>
348
-
349
-
350
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">doc = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
351
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'more_views'</span>,
352
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/my_views.json'</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
353
- &nbsp;
354
- Couchdb.<span style="color:#9900CC;">create_design</span> doc</pre></div></div>
355
-
356
-
357
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
358
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'my_views'</span>,
359
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_emails'</span>,
360
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/my_views.json'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
361
- &nbsp;
362
- Couchdb.<span style="color:#9900CC;">find_on_fly</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
363
-
364
- <p>This works for all methods except when you are passing a key value to the database. In that case, pass an empty string in place of the auth_session.</p>
365
- <p>Example:</p>
366
-
367
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;contacts&quot;</span>,
368
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
369
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
370
- age = <span style="color:#996600;">&quot;36&quot;</span>
371
- Couchdb.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,<span style="color:#996600;">&quot;&quot;</span>,key = age<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
372
-
373
- <p>And</p>
374
-
375
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
376
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
377
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span>,
378
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/view_age.json'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
379
- &nbsp;
380
- age = <span style="color:#996600;">'36'</span>
381
- Couchdb.<span style="color:#9900CC;">find_on_fly</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,<span style="color:#996600;">&quot;&quot;</span>,key = age<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
382
-
383
- <p><strong>Query Options with Find on fly </strong><br />
384
- All the query options described earlier are also work for find_on_fly(). Example:</p>
385
-
386
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> view = <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:database</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'contacts'</span>,
387
- <span style="color:#ff3333; font-weight:bold;">:design_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'the_view'</span>,
388
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'age'</span>,
389
- <span style="color:#ff3333; font-weight:bold;">:json_doc</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'/path/to/view_age.json'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
390
- &nbsp;
391
- age = <span style="color:#996600;">'36'</span>
392
- Couchdb.<span style="color:#9900CC;">find_on_fly</span><span style="color:#006600; font-weight:bold;">&#40;</span>view,auth_session,key = age, options= <span style="color:#006600; font-weight:bold;">&#123;</span>:limit <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">12</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
393
-
394
- <p>The above example will return the first 12 contacts that are 36 years old.</p>
395
- </div><!-- .entry-content -->
396
-
397
-
398
- </div><!-- .hentry -->
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
- </div><!-- .content .hfeed -->
407
-
408
-
409
- <div id="primary" class="sidebar aside">
410
-
411
-
412
- <div id="hybrid-nav-menu-3" class="widget nav-menu widget-nav-menu"><div class="widget-wrap widget-inside"><h3 class="widget-title">Leanback</h3><div class="menu-sidebar-container"><ul id="menu-sidebar" class="nav-menu"><li id="menu-item-13" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-13"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/leanback/">Leanback</a><ul class="sub-menu"><li id="menu-item-14" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-14"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/leanback/installation/">Install</a></li><li id="menu-item-15" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-15"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/basic-couchdb-operations/">Basic CouchDB Operations</a></li><li id="menu-item-41" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-41"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-documents-by-key/">Find documents by key</a></li><li id="menu-item-167" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-167"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-document-by-multiple-keys/">Find document by multiple Keys</a></li><li id="menu-item-140" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-140"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/count-documents-by-key/">Count documents by key</a></li><li id="menu-item-175" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-175"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/count-by-multiple-documents/">Count documents by multiple keys</a></li><li id="menu-item-45" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-43 current_page_item menu-item-45"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/design-documents-and-permanent-views/">Working with CouchDB views</a></li><li id="menu-item-67" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-67"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/error-handling/">Error handling</a></li><li id="menu-item-96" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-96"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/couchdb-configuration/">CouchDB Configuration</a></li><li id="menu-item-102" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-102"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/couchdb-security/">CouchDB Security</a></li><li id="menu-item-105" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-105"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/setting-the-bind_address-port/">CouchDB Bind_Address &#038; Port</a></li></ul></li><li id="menu-item-142" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-142"><a href="https://github.com/obi-a/leanback/blob/master/Changelog.rdoc">Changes</a></li><li id="menu-item-78" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-78"><a href="https://github.com/obi-a/leanback">Source Code</a></li></ul></div></div></div>
413
-
414
- </div><!-- #primary .aside -->
415
-
416
-
417
- </div><!-- #container -->
418
-
419
- <div id="footer-container">
420
-
421
-
422
- <div id="footer">
423
-
424
- <div class="footer-insert"><p class="copyright">Copyright &#169; 2013 <a href="http://obi-akubue.org">obi-akubue.org</a>.</p></div>
425
- </div><!-- #footer -->
426
-
427
-
428
- </div><!-- #footer-container -->
429
-
430
- </div><!-- #body-container -->
431
-
432
-
433
- <script type="text/javascript">
434
-
435
- var _gaq = _gaq || [];
436
- _gaq.push(['_setAccount', 'UA-20190925-6']);
437
- _gaq.push(['_trackPageview']);
438
-
439
- (function() {
440
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
441
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
442
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
443
- })();
444
- </script>
445
-
446
- <a style='color:transparent;position:absolute;left:-99999px;z-index:-99999' href='http://www.wpdownloadmanager.com/' title='Premium Wordpress Plugin download manager'>Premium Wordpress Plugin</a>
447
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-content/themes/hybrid/library/js/drop-downs.js?ver=20110705'></script>
448
-
449
- </body>
450
- </html>
451
- <!-- Dynamic page generated in 0.686 seconds. -->
452
- <!-- Cached page generated by WP-Super-Cache on 2013-06-09 16:31:57 -->
453
-
454
- <!-- super cache -->