[#180,refactor][xs]: rename couchdb demo url to /couchdb/ from /couchdb_multiview/.

This commit is contained in:
Rufus Pollock
2012-09-09 16:09:31 +01:00
parent d1cc591dfc
commit 1effe779f3
4 changed files with 17 additions and 17 deletions

View File

@@ -60,7 +60,7 @@ root: ../
<div class="row" id="couchdb"> <div class="row" id="couchdb">
<div class="span4"> <div class="span4">
<div class="well"> <div class="well">
<h3><a href="couchdb_multiview/">CouchDB Demo</a></h3> <h3><a href="couchdb/">CouchDB Demo</a></h3>
<p>Using CouchDB with Recline Multiview to provide an elegant powerful browser for a CouchDB database and view.</p> <p>Using CouchDB with Recline Multiview to provide an elegant powerful browser for a CouchDB database and view.</p>
</div> </div>
</div> </div>

View File

@@ -14,7 +14,7 @@ my.__type__ = 'couchdb';
// //
// TODO Add user/password arguments for couchdb authentication support. // TODO Add user/password arguments for couchdb authentication support.
// //
// See the example how to use this in: "demos/couchdb_multiview" // See the example how to use this in: "demos/couchdb/"
my.CouchDBWrapper = function(db_url, view_url, options) { my.CouchDBWrapper = function(db_url, view_url, options) {
var self = this; var self = this;
self.endpoint = db_url; self.endpoint = db_url;
@@ -151,29 +151,29 @@ my.__type__ = 'couchdb';
// //
// Backbone connector for a CouchDB backend. // Backbone connector for a CouchDB backend.
// //
// The couchdb is referring to my apache reverse proxy. You will need a proxy to connect to the database. // var dataset = new recline.Model.Dataset({
// db_url: path-to-couchdb-database e.g. '/couchdb/mydb',
// view_url: path-to-couchdb-database-view e.g. '/couchdb/mydb/_design/design1/_views/view1',
// backend: 'couchdb',
// query_options: {
// 'key': '_id'
// }
// });
// //
// Usage: (also see demos/couchdb_multiview) // backend.query(query, dataset.toJSON()).done(function () { ... });
// var dataset = new recline.Model.Dataset({
// db_url: '/couchdb/mydb',
// view_url: '/couchdb/mydb/_design/design1/_views/view1',
// backend: 'couchdb',
// query_options: {
// 'key': '_id'
// }
// });
//
// backend.query(query, dataset.toJSON()).done(function () { ... });
// //
// Alternatively: // Alternatively:
// var dataset = new recline.Model.Dataset({ ... }, 'couchdb'); //
// dataset.fetch(); // var dataset = new recline.Model.Dataset({ ... }, 'couchdb');
// var results = dataset.query(query_obj); // dataset.fetch();
// var results = dataset.query(query_obj);
// //
// Additionally, the Dataset instance may define three methods: // Additionally, the Dataset instance may define three methods:
//
// function record_update (record, document) { ... } // function record_update (record, document) { ... }
// function record_delete (record, document) { ... } // function record_delete (record, document) { ... }
// function record_create (record, document) { ... } // function record_create (record, document) { ... }
//
// Where `record` is the JSON representation of the Record/Document instance // Where `record` is the JSON representation of the Record/Document instance
// and `document` is the JSON document stored in couchdb. // and `document` is the JSON document stored in couchdb.
// When _all_docs view is used (default), a record is the same as a document // When _all_docs view is used (default), a record is the same as a document