[#180,refactor][xs]: rename couchdb demo url to /couchdb/ from /couchdb_multiview/.
This commit is contained in:
parent
d1cc591dfc
commit
1effe779f3
@ -60,7 +60,7 @@ root: ../
|
||||
<div class="row" id="couchdb">
|
||||
<div class="span4">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -14,7 +14,7 @@ my.__type__ = 'couchdb';
|
||||
//
|
||||
// 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) {
|
||||
var self = this;
|
||||
self.endpoint = db_url;
|
||||
@ -151,29 +151,29 @@ my.__type__ = 'couchdb';
|
||||
//
|
||||
// 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)
|
||||
// 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 () { ... });
|
||||
// backend.query(query, dataset.toJSON()).done(function () { ... });
|
||||
//
|
||||
// Alternatively:
|
||||
// var dataset = new recline.Model.Dataset({ ... }, 'couchdb');
|
||||
// dataset.fetch();
|
||||
// var results = dataset.query(query_obj);
|
||||
//
|
||||
// var dataset = new recline.Model.Dataset({ ... }, 'couchdb');
|
||||
// dataset.fetch();
|
||||
// var results = dataset.query(query_obj);
|
||||
//
|
||||
// Additionally, the Dataset instance may define three methods:
|
||||
//
|
||||
// function record_update (record, document) { ... }
|
||||
// function record_delete (record, document) { ... }
|
||||
// function record_create (record, document) { ... }
|
||||
//
|
||||
// Where `record` is the JSON representation of the Record/Document instance
|
||||
// and `document` is the JSON document stored in couchdb.
|
||||
// When _all_docs view is used (default), a record is the same as a document
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user