Example #1
0
        /// <summary>
        /// This is a bulk key request, not to be confused with requests using complex keys, see Key().
        /// </summary>
        public CouchQuery Keys(IList <object> keys)
        {
            var bulk = new CouchBulkKeys(keys.ToArray());

            Data(CouchDocument.WriteJson(bulk));
            return(this);
        }
Example #2
0
        /// <summary>
        /// This is a bulk key request, not to be confused with requests using complex keys, see Key().
        /// </summary>
        public CouchQuery Keys(object[] keys)
        {
            var bulk = new CouchBulkKeys(keys);

            Data(CouchDocument.WriteJson(bulk));
            return(this);
        }
Example #3
0
        public IEnumerable <T> GetArbitraryDocuments <T>(IEnumerable <string> documentIds, Func <T> ctor)
        {
            var bulk = new CouchBulkKeys(documentIds.Cast <object>());

            return(QueryAllDocuments().Data(CouchDocument.WriteJson(bulk)).IncludeDocuments().GetResult().ArbitraryDocuments(ctor));
        }
Example #4
0
        public IEnumerable <T> GetDocuments <T>(IEnumerable <string> documentIds) where T : ICouchDocument, new()
        {
            var bulk = new CouchBulkKeys(documentIds.Cast <object>());

            return(QueryAllDocuments().Data(CouchDocument.WriteJson(bulk)).IncludeDocuments().GetResult().Documents <T>());
        }