leanback 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,157 +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>Error handling</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, November 20th, 2011, 3:27 am" />
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='Working with CouchDB views' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/design-documents-and-permanent-views/' />
21
- <link rel='next' title='CouchDB Configuration' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/couchdb-configuration/' />
22
- <link rel='canonical' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/error-handling/' />
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-59 page-template-default page-59 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">Error handling</span></div></div>
52
-
53
- <div id="post-59" 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/error-handling/" title="Error handling" rel="bookmark">Error handling</a></h1>
56
- <div class="entry-content">
57
- <p>Leanback raises a CouchdbException when things go wrong.</p>
58
- <p>Attempting to create a database that already exists</p>
59
-
60
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> <span style="color:#9966CC; font-weight:bold;">begin</span>
61
- Couchdb.<span style="color:#9900CC;">create</span> <span style="color:#996600;">'contacts'</span>
62
- <span style="color:#9966CC; font-weight:bold;">rescue</span> CouchdbException <span style="color:#006600; font-weight:bold;">=&gt;</span> e
63
- <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error message: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">to_s</span>
64
- <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error value: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">error</span>
65
- <span style="color:#9966CC; font-weight:bold;">end</span>
66
- &nbsp;
67
- <span style="color:#008000; font-style:italic;"># =&gt; Error message: CouchDB: Error - file_exists. Reason - The database could not be created, the file already exists.</span>
68
- <span style="color:#008000; font-style:italic;"># Error value: file_exists</span></pre></div></div>
69
-
70
- <p>Attempting to delete a database that doesn’t exist</p>
71
-
72
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> <span style="color:#9966CC; font-weight:bold;">begin</span>
73
- Couchdb.<span style="color:#9900CC;">delete</span> <span style="color:#996600;">'buildings'</span>
74
- <span style="color:#9966CC; font-weight:bold;">rescue</span> CouchdbException <span style="color:#006600; font-weight:bold;">=&gt;</span> e
75
- <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error message: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">to_s</span>
76
- <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error value: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">error</span>
77
- <span style="color:#9966CC; font-weight:bold;">end</span>
78
- &nbsp;
79
- <span style="color:#008000; font-style:italic;"># =&gt; Error message: CouchDB: Error - not_found. Reason - missing</span>
80
- <span style="color:#008000; font-style:italic;"># Error value: not_found</span></pre></div></div>
81
-
82
- <p>Attempting to query a permanent view that doesn’t exist</p>
83
-
84
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> <span style="color:#9966CC; font-weight:bold;">begin</span>
85
- 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>,
86
- <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>,
87
- <span style="color:#ff3333; font-weight:bold;">:view</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'get_user_email'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
88
- Couchdb.<span style="color:#9900CC;">find</span> view
89
- <span style="color:#9966CC; font-weight:bold;">rescue</span> CouchdbException <span style="color:#006600; font-weight:bold;">=&gt;</span> e
90
- <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error message: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">to_s</span>
91
- <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Error value: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> e.<span style="color:#9900CC;">error</span>
92
- <span style="color:#9966CC; font-weight:bold;">end</span>
93
- &nbsp;
94
- <span style="color:#008000; font-style:italic;"># =&gt; Error message: CouchDB: Error - not_found. Reason - missing_named_view</span>
95
- <span style="color:#008000; font-style:italic;"># Error value: not_found</span></pre></div></div>
96
-
97
- <p>You can always check the information passed to the Exception.</p>
98
- </div><!-- .entry-content -->
99
-
100
-
101
- </div><!-- .hentry -->
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
- </div><!-- .content .hfeed -->
110
-
111
-
112
- <div id="primary" class="sidebar aside">
113
-
114
-
115
- <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 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 current-menu-item page_item page-item-59 current_page_item 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>
116
-
117
- </div><!-- #primary .aside -->
118
-
119
-
120
- </div><!-- #container -->
121
-
122
- <div id="footer-container">
123
-
124
-
125
- <div id="footer">
126
-
127
- <div class="footer-insert"><p class="copyright">Copyright &#169; 2013 <a href="http://obi-akubue.org">obi-akubue.org</a>.</p></div>
128
- </div><!-- #footer -->
129
-
130
-
131
- </div><!-- #footer-container -->
132
-
133
- </div><!-- #body-container -->
134
-
135
-
136
- <script type="text/javascript">
137
-
138
- var _gaq = _gaq || [];
139
- _gaq.push(['_setAccount', 'UA-20190925-6']);
140
- _gaq.push(['_trackPageview']);
141
-
142
- (function() {
143
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
144
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
145
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
146
- })();
147
- </script>
148
-
149
- <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>
150
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-content/themes/hybrid/library/js/drop-downs.js?ver=20110705'></script>
151
-
152
- </body>
153
- </html>
154
- <!-- Dynamic page generated in 0.455 seconds. -->
155
- <!-- Cached page generated by WP-Super-Cache on 2013-06-09 16:30:33 -->
156
-
157
- <!-- super cache -->
@@ -1,269 +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>Find document by multiple Keys</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) June 2013" />
16
- <meta name="revised" content="Sunday, June 9th, 2013, 3:51 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
- <link rel="alternate" type="application/rss+xml" title="Leanback &raquo; Find document by multiple Keys Comments Feed" href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-document-by-multiple-keys/feed/" />
20
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-includes/js/comment-reply.min.js?ver=3.5.1'></script>
21
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>
22
- <link rel='prev' title='Count documents by key' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/count-documents-by-key/' />
23
- <link rel='next' title='Count documents by multiple keys' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/count-by-multiple-documents/' />
24
- <link rel='canonical' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-document-by-multiple-keys/' />
25
-
26
- <link rel="stylesheet" href="http://www.whisperservers.com/leanback/wp-content/plugins/wp-syntax/wp-syntax.css" type="text/css" media="screen" />
27
-
28
- </head>
29
-
30
- <body class="wordpress ltr en_US parent-theme y2013 m06 d09 h16 sunday logged-out singular singular-page singular-page-164 page-template-default page-164 primary-active secondary-inactive subsidiary-inactive">
31
-
32
-
33
- <div id="body-container">
34
-
35
-
36
- <div id="header-container">
37
-
38
- <div id="header">
39
-
40
- <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>
41
- <div id="site-description"><span>Simple Ruby interface to CouchDB</span></div>
42
-
43
- </div><!-- #header -->
44
-
45
- </div><!-- #header-container -->
46
-
47
-
48
- <div id="container">
49
-
50
-
51
- <div id="content" class="hfeed content">
52
-
53
- <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">Find document by multiple Keys</span></div></div>
54
-
55
- <div id="post-164" class="hentry page publish post-1 odd author-admin">
56
-
57
- <h1 class="page-title entry-title"><a href="http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-document-by-multiple-keys/" title="Find document by multiple Keys" rel="bookmark">Find document by multiple Keys</a></h1>
58
- <div class="entry-content">
59
- <p>First we login to CouchDB and generate the auth_session token for making requests.</p>
60
-
61
- <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>
62
- 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>
63
-
64
- <p>To retrieve all documents in the friends database with gender = male and age = 34</p>
65
-
66
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
67
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
68
-
69
- <p>To retrieve all documents in the friends database with gender = male, age = 34 and lastname = smith</p>
70
-
71
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span>, <span style="color:#ff3333; font-weight:bold;">:lastname</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'smith'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
72
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
73
-
74
- <p>If you are running an admin party (i.e you have no admins in CouchDB), simply use the same methods, with no auth_session parameter.</p>
75
-
76
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
77
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
78
-
79
- <p><strong>Options</strong><br />
80
- A set of options can be used to manipulate the results.</p>
81
- <p><strong>limits</strong><br />
82
- To limit the results. Example to return the first 20 documents with age=34 and gender = male:</p>
83
-
84
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">options = <span style="color:#006600; font-weight:bold;">&#123;</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>
85
- keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
86
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
87
-
88
- <p>For admin party,</p>
89
-
90
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">options = <span style="color:#006600; font-weight:bold;">&#123;</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>
91
- keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
92
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,<span style="color:#996600;">&quot;&quot;</span>, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
93
-
94
- <p><strong>skip</strong><br />
95
- To skip the first 10 results and return the next 20:</p>
96
-
97
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">options = <span style="color:#006600; font-weight:bold;">&#123;</span>:skip <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">10</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>
98
- keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
99
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
100
-
101
- <p>Note that the skip option is considered a relatively expensive CouchDB operation because the rows are still processed and skipped.</p>
102
- <p>To skip the first 20 results and return the rest:</p>
103
-
104
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
105
- keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
106
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
107
-
108
- <p><strong>descending</strong><br />
109
- Couchdb returns results in ascending order by default, to change it to descending order:</p>
110
-
111
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
112
- keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
113
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
114
-
115
- <p><strong>startkey &#038; endkey</strong><br />
116
- startkey &#038; endkey don&#8217;t work with find_by_keys() because find_by_keys already uses them. See the next section for details.</p>
117
- <p><strong>How it works</strong><br />
118
- The method</p>
119
-
120
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
121
- Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
122
-
123
- <p>sends a</p>
124
-
125
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/friends/_design/gender_age_keys_finder/_view/find_by_keys_gender_age?startkey=[&quot;male&quot;,&quot;34&quot;]&amp;endkey=[&quot;male&quot;,&quot;34&quot;]</pre></div></div>
126
-
127
- <p>This returns all friends with gender = male and age = 34. Leanback will parse the native JSON results to return only the data. If the design_document (_design/gender_age_keys_finder) and the view (find_by_keys_gender_age) doesn&#8217;t exist, Leanback will create it in the database. See the source for the generated design_document;</p>
128
-
129
- <div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
130
- <span style="color: #3366CC;">&quot;_id&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;_design/gender_age_keys_finder&quot;</span><span style="color: #339933;">,</span>
131
- <span style="color: #3366CC;">&quot;_rev&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;1-92674ebbb4bca65add937f764b37623d&quot;</span><span style="color: #339933;">,</span>
132
- <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>
133
- <span style="color: #3366CC;">&quot;views&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
134
- <span style="color: #3366CC;">&quot;find_by_keys_gender_age&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
135
- <span style="color: #3366CC;">&quot;map&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;function(doc){ if(doc.gender &amp;&amp; doc.age) emit([doc.gender,doc.age],doc);}&quot;</span>
136
- <span style="color: #009900;">&#125;</span>
137
- <span style="color: #009900;">&#125;</span>
138
- <span style="color: #009900;">&#125;</span></pre></div></div>
139
-
140
- <p><strong>Usage</strong><br />
141
- You can do</p>
142
-
143
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> keys = <span style="color:#006600; font-weight:bold;">&#123;</span>:gender <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'male'</span>,:age <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'34'</span><span style="color:#006600; font-weight:bold;">&#125;</span>
144
- docs = Couchdb.<span style="color:#9900CC;">find_by_keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'friends'</span>, <span style="color:#ff3333; font-weight:bold;">:keys</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> keys<span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
145
- docs.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>d<span style="color:#006600; font-weight:bold;">|</span>
146
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;_rev&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
147
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;_id&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
148
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;firstname&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
149
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;lastname&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
150
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;age&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
151
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;gender&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
152
- <span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>
153
-
154
- </div><!-- .entry-content -->
155
-
156
-
157
- </div><!-- .hentry -->
158
-
159
-
160
-
161
- <div id="disqus_thread">
162
- </div>
163
-
164
- <script type="text/javascript">
165
- /* <![CDATA[ */
166
- var disqus_url = 'http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-document-by-multiple-keys/';
167
- var disqus_identifier = '164 http://www.whisperservers.com/leanback/?page_id=164';
168
- var disqus_container_id = 'disqus_thread';
169
- var disqus_domain = 'disqus.com';
170
- var disqus_shortname = 'obi-akubue';
171
- var disqus_title = "Find document by multiple Keys";
172
- var disqus_config = function () {
173
- var config = this; // Access to the config object
174
-
175
- /*
176
- All currently supported events:
177
- * preData — fires just before we request for initial data
178
- * preInit - fires after we get initial data but before we load any dependencies
179
- * onInit - fires when all dependencies are resolved but before dtpl template is rendered
180
- * afterRender - fires when template is rendered but before we show it
181
- * onReady - everything is done
182
- */
183
-
184
- config.callbacks.preData.push(function() {
185
- // clear out the container (its filled for SEO/legacy purposes)
186
- document.getElementById(disqus_container_id).innerHTML = '';
187
- });
188
- config.callbacks.onReady.push(function() {
189
- // sync comments in the background so we don't block the page
190
- DISQUS.request.get('?cf_action=sync_comments&post_id=164');
191
- });
192
- };
193
- var facebookXdReceiverPath = 'http://www.whisperservers.com/leanback/wp-content/plugins/disqus-comment-system/xd_receiver.htm';
194
- /* ]]> */
195
- </script>
196
-
197
- <script type="text/javascript">
198
- /* <![CDATA[ */
199
- var DsqLocal = {
200
- 'trackbacks': [
201
- ],
202
- 'trackback_url': "http:\/\/www.whisperservers.com\/leanback\/wp-content\/plugins\/really-static\/static\/find-document-by-multiple-keys\/trackback\/" };
203
- /* ]]> */
204
- </script>
205
-
206
- <script type="text/javascript">
207
- /* <![CDATA[ */
208
- (function() {
209
- var dsq = document.createElement('script'); dsq.type = 'text/javascript';
210
- dsq.async = true;
211
- dsq.src = 'http://' + disqus_shortname + '.' + disqus_domain + '/embed.js?pname=wordpress&pver=2.67';
212
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
213
- })();
214
- /* ]]> */
215
- </script>
216
-
217
-
218
-
219
-
220
-
221
- </div><!-- .content .hfeed -->
222
-
223
-
224
- <div id="primary" class="sidebar aside">
225
-
226
-
227
- <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 current-menu-item page_item page-item-164 current_page_item 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 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>
228
-
229
- </div><!-- #primary .aside -->
230
-
231
-
232
- </div><!-- #container -->
233
-
234
- <div id="footer-container">
235
-
236
-
237
- <div id="footer">
238
-
239
- <div class="footer-insert"><p class="copyright">Copyright &#169; 2013 <a href="http://obi-akubue.org">obi-akubue.org</a>.</p></div>
240
- </div><!-- #footer -->
241
-
242
-
243
- </div><!-- #footer-container -->
244
-
245
- </div><!-- #body-container -->
246
-
247
-
248
- <script type="text/javascript">
249
-
250
- var _gaq = _gaq || [];
251
- _gaq.push(['_setAccount', 'UA-20190925-6']);
252
- _gaq.push(['_trackPageview']);
253
-
254
- (function() {
255
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
256
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
257
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
258
- })();
259
- </script>
260
-
261
- <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>
262
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-content/themes/hybrid/library/js/drop-downs.js?ver=20110705'></script>
263
-
264
- </body>
265
- </html>
266
- <!-- Dynamic page generated in 0.497 seconds. -->
267
- <!-- Cached page generated by WP-Super-Cache on 2013-06-09 16:30:47 -->
268
-
269
- <!-- super cache -->
@@ -1,243 +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>Find documents by key</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='Basic CouchDB Operations' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/basic-couchdb-operations/' />
21
- <link rel='next' title='Working with CouchDB views' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/design-documents-and-permanent-views/' />
22
- <link rel='canonical' href='http://www.whisperservers.com/leanback/wp-content/plugins/really-static/static/find-documents-by-key/' />
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-26 page-template-default page-26 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">Find documents by key</span></div></div>
52
-
53
- <div id="post-26" 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/find-documents-by-key/" title="Find documents by key" rel="bookmark">Find documents by key</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>To find documents by email key (example: to find all contacts with email = ‘nancy@mail.com’)</p>
63
-
64
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:email</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'nancy@mail.com'</span><span style="color:#006600; font-weight:bold;">&#125;</span> , auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
65
- &nbsp;
66
- <span style="color:#008000; font-style:italic;"># =&gt; [{&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>
67
- <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>
68
-
69
- <p>To find all contacts with lastname = ‘Smith’</p>
70
-
71
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:lastname</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Smith'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
72
- &nbsp;
73
- <span style="color:#008000; font-style:italic;"># =&gt; [{&quot;_id&quot;=&gt;&quot;john&quot;, &quot;_rev&quot;=&gt;&quot;5-642689e0a50843d6fa508159a01b4fd4&quot;, &quot;firstname&quot;=&gt;&quot;John&quot;, &quot;lastname&quot;=&gt;&quot;Smith&quot;,</span>
74
- <span style="color:#008000; font-style:italic;"># &quot;email&quot;=&gt;&quot;john@mail.com&quot;, &quot;gender&quot;=&gt;&quot;male&quot;}]</span></pre></div></div>
75
-
76
- <p>To find all female contacts</p>
77
-
78
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
79
- &nbsp;
80
- <span style="color:#008000; font-style:italic;"># =&gt; [{&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>
81
- <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>
82
-
83
- <p>If you are running an admin party (i.e you have no admins in CouchDB), simply use the same methods, with no auth_session parameter.</p>
84
-
85
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
86
-
87
- <p><strong>Options</strong><br />
88
- A set of options can be used to manipulate the results.</p>
89
- <p><strong>limits</strong><br />
90
- To limit the results. Example to return the first 20 female contacts:</p>
91
-
92
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">options = <span style="color:#006600; font-weight:bold;">&#123;</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>
93
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
94
-
95
- <p><strong>skip</strong><br />
96
- To skip the first 10 female contacts and return 20:</p>
97
-
98
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">options = <span style="color:#006600; font-weight:bold;">&#123;</span>:skip <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">10</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>
99
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
100
-
101
- <p>Note that the skip option is considered a relatively expensive CouchDB operations because the rows are still processed and skipped.</p>
102
- <p>To skip the first 20 female contacts and return all remaining contacts:</p>
103
-
104
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
105
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
106
-
107
- <p><strong>descending</strong><br />
108
- Couchdb returns results in ascending order by default, to change it to descending order:</p>
109
-
110
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
111
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
112
-
113
- <p><strong>startkey &#038; endkey</strong><br />
114
- To return the results within a range. For example in an employee database, to return all employees with the salary range 53000 to 99000</p>
115
-
116
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
117
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'employees'</span>, <span style="color:#ff3333; font-weight:bold;">:salary</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
118
-
119
- <p>To return the first 20 employees with salary between 53000 and 99000.</p>
120
-
121
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
122
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'employees'</span>, <span style="color:#ff3333; font-weight:bold;">:salary</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
123
-
124
- <p>To return all employees with salary 99000 or less:</p>
125
-
126
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">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>
127
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#123;</span>:database <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'employees'</span>, <span style="color:#ff3333; font-weight:bold;">:salary</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">''</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session, options<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
128
-
129
- <p><strong>How it works</strong><br />
130
- The method</p>
131
-
132
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:email</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'nancy@mail.com'</span><span style="color:#006600; font-weight:bold;">&#125;</span>, auth_session<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
133
-
134
- <p>sends a</p>
135
-
136
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">GET http://127.0.0.1:5984/contacts/_design/email_finder/_view/find_by_email?key=&quot;nancy@mail.com&quot;</pre></div></div>
137
-
138
- <p>This returns all contacts with email = ‘nancy@mail.com’. Leanback will parse the native JSON results to return only the data values. If the design_document (_design/email_finder) and the view (find_by_email) doesn’t exist, Leanback will create it in the database. See the source for the generated design_document;</p>
139
-
140
- <div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
141
- <span style="color: #3366CC;">&quot;_id&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;_design/email_finder&quot;</span><span style="color: #339933;">,</span>
142
- <span style="color: #3366CC;">&quot;_rev&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;7-da7f3c0bf183f4a36a82013bd0ea6537&quot;</span><span style="color: #339933;">,</span>
143
- <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>
144
- <span style="color: #3366CC;">&quot;views&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
145
- <span style="color: #3366CC;">&quot;find_by_email&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
146
- <span style="color: #3366CC;">&quot;map&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;function(doc){
147
- if(doc.email)
148
- emit(doc.email,doc);
149
- }&quot;</span>
150
- <span style="color: #009900;">&#125;</span>
151
- <span style="color: #009900;">&#125;</span>
152
- <span style="color: #009900;">&#125;</span></pre></div></div>
153
-
154
- <p>If you ran</p>
155
-
156
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:lastname</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Smith'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
157
- Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:gender</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'female'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>
158
-
159
- <p>you will notice the following design_documents have been added to the database</p>
160
-
161
- <div class="wp_syntax"><div class="code"><pre class="plain" style="font-family:monospace;">_design/lastname_finder
162
- _design/gender_finder</pre></div></div>
163
-
164
- <p><strong>Usage</strong><br />
165
- You can do</p>
166
-
167
- <div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> docs = Couchdb.<span style="color:#9900CC;">find_by</span><span style="color:#006600; font-weight:bold;">&#40;</span><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>, <span style="color:#ff3333; font-weight:bold;">:email</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'nancy@mail.com'</span><span style="color:#006600; font-weight:bold;">&#125;</span>,auth_session<span style="color:#006600; font-weight:bold;">&#41;</span>
168
- docs.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>d<span style="color:#006600; font-weight:bold;">|</span>
169
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;_rev&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
170
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;_id&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
171
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;firstname&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
172
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;lastname&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
173
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;email&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
174
- <span style="color:#CC0066; font-weight:bold;">puts</span> d<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;phone&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
175
- <span style="color:#9966CC; font-weight:bold;">end</span>
176
- &nbsp;
177
- <span style="color:#008000; font-style:italic;"># =&gt; rev1-d15a83d2a23b495c19df2595b636ecc8</span>
178
- <span style="color:#008000; font-style:italic;"># Nancy</span>
179
- <span style="color:#008000; font-style:italic;"># Nancy</span>
180
- <span style="color:#008000; font-style:italic;"># Lee</span>
181
- <span style="color:#008000; font-style:italic;"># nancy@mail.com</span>
182
- <span style="color:#008000; font-style:italic;"># 347-808-3734</span></pre></div></div>
183
-
184
- </div><!-- .entry-content -->
185
-
186
-
187
- </div><!-- .hentry -->
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
- </div><!-- .content .hfeed -->
196
-
197
-
198
- <div id="primary" class="sidebar aside">
199
-
200
-
201
- <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 current-menu-item page_item page-item-26 current_page_item 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 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>
202
-
203
- </div><!-- #primary .aside -->
204
-
205
-
206
- </div><!-- #container -->
207
-
208
- <div id="footer-container">
209
-
210
-
211
- <div id="footer">
212
-
213
- <div class="footer-insert"><p class="copyright">Copyright &#169; 2013 <a href="http://obi-akubue.org">obi-akubue.org</a>.</p></div>
214
- </div><!-- #footer -->
215
-
216
-
217
- </div><!-- #footer-container -->
218
-
219
- </div><!-- #body-container -->
220
-
221
-
222
- <script type="text/javascript">
223
-
224
- var _gaq = _gaq || [];
225
- _gaq.push(['_setAccount', 'UA-20190925-6']);
226
- _gaq.push(['_trackPageview']);
227
-
228
- (function() {
229
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
230
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
231
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
232
- })();
233
- </script>
234
-
235
- <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>
236
- <script type='text/javascript' src='http://www.whisperservers.com/leanback/wp-content/themes/hybrid/library/js/drop-downs.js?ver=20110705'></script>
237
-
238
- </body>
239
- </html>
240
- <!-- Dynamic page generated in 0.547 seconds. -->
241
- <!-- Cached page generated by WP-Super-Cache on 2013-06-09 16:30:52 -->
242
-
243
- <!-- super cache -->