a:10:{s:9:"#provides";s:27:"dojox.data.CouchDBRestStore";s:9:"#resource";s:24:"data/CouchDBRestStore.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:24:"dojox.data.JsonRestStore";}}s:27:"dojox.data.CouchDBRestStore";a:4:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:24:"dojox.data.JsonRestStore";}s:4:"call";a:1:{i:0;s:24:"dojox.data.JsonRestStore";}}s:9:"classlike";b:1;s:7:"summary";s:0:"";}s:32:"dojox.data.CouchDBRestStore.save";a:5:{s:9:"prototype";s:27:"dojox.data.CouchDBRestStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:6:"kwArgs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:557:"			var actions = this.inherited(arguments); // do the default save and then update for version numbers
			var prefix = this.service.servicePath;
			for(var i = 0; i < actions.length; i++){
				// need to update the item's version number after it has been committed
				(function(item,dfd){
					dfd.addCallback(function(result){
						if(result){
							item.__id = prefix + result.id; // update the object with the results of the post
							item._rev = result.rev;
						}
						return result;
					});
				})(actions[i].content,actions[i].deferred);
			}";s:7:"summary";s:0:"";}s:33:"dojox.data.CouchDBRestStore.fetch";a:5:{s:9:"prototype";s:27:"dojox.data.CouchDBRestStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"args";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:339:"			args.query = args.query || '_all_docs?';
			if(args.start){
				args.query = (args.query ? (args.query + '&') : '') + 'startkey=' + args.start;
				delete args.start;
			}
			if(args.count){
				args.query = (args.query ? (args.query + '&') : '') + 'count=' + args.count;
				delete args.count;
			}
			return this.inherited(arguments);";s:7:"summary";s:131:"This only differs from JsonRestStore in that it, will put the query string the query part of the URL and it handles start and count";}s:43:"dojox.data.CouchDBRestStore._processResults";a:6:{s:9:"prototype";s:27:"dojox.data.CouchDBRestStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"results";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:517:"			var rows = results.rows;
			if(rows){
				var prefix = this.service.servicePath;
				var self = this;
				for(var i = 0; i < rows.length;i++){
					rows[i] = {
						__id: prefix + rows[i].id, 
						_id: rows[i].id,
						_loadObject: function(callback){
							self.fetchItemByIdentity({
								identity: this._id,
								onItem: callback
							});
							delete this._loadObject;
						}
					};
				}
				return {totalCount:results.total_rows, items:results.rows};
			}else{
				return {items:results};
			}";s:7:"private";b:1;s:7:"summary";s:0:"";}s:37:"dojox.data.CouchDBRestStore.getStores";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:14:"couchServerUrl";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:328:"	var dfd = dojo.xhrGet({
		url: couchServerUrl+"_all_dbs",
		handleAs: "json",
		sync: true
	});
	var stores = {};
	dfd.addBoth(function(dbs){
		for(var i = 0; i < dbs.length; i++){
			stores[dbs[i]] = new dojox.data.CouchDBRestStore({target:couchServerUrl + dbs[i],idAttribute:"_id"});
		}
		return stores;
	});
	return stores;";s:7:"summary";s:0:"";}s:10:"dojox.data";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}