コード例 #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);
        }
コード例 #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);
        }
コード例 #3
0
ファイル: CouchDatabase.cs プロジェクト: mgornik/Divan
        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));
        }
コード例 #4
0
ファイル: CouchDatabase.cs プロジェクト: mgornik/Divan
        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>());
        }