private CouchRequest GetRequest(ViewOptions options, string uri) { if (options != null) { uri += options.ToString(); } return(GetRequest(uri, options == null ? null : options.Etag).Get().Json()); }
private CouchRequest GetRequest(ViewOptions options, string uri) { if (options != null) { uri += options.ToString(); } CouchRequest request = GetRequest(uri, options == null ? null : options.Etag).Get().Json(); if (options.isAtKeysSizeLimit) { // Encode the keys parameter in the request body and turn it into a POST request. string keys = "{\"keys\": [" + String.Join(",", options.Keys.Select(k => k.ToRawString()).ToArray()) + "]}"; request.Post().Data(keys); } return(request); }
public IListResult List(string listName, string viewName, ViewOptions options, string designDoc) { var uri = databaseBaseUri + "/_design/" + designDoc + "/_list/" + listName + "/" + viewName + options.ToString(); var req = GetRequest(uri); return(new ListResult(req.GetRequest(), req.GetResponse())); }
public IListResult List(string listName, string viewName, ViewOptions options, string designDoc) { var uri = string.Format("{0}/_design/{1}/_list/{2}/{3}{4}", databaseBaseUri, designDoc, listName, viewName, options.ToString()); var req = GetRequest(uri); return(new ListResult(req.GetRequest(), req.GetCouchResponse())); }