コード例 #1
0
        private IEnumerable<RiakIndexKeyTerm> GetIndexKeyTerm(RpbIndexResp response)
        {
            if (_includeTerms)
            {
                return response.results
                    .Select(pair =>new RiakIndexKeyTerm(pair.value.FromRiakString(), pair.key.FromRiakString()));
            }

            return response.keys
                .Select(key => new RiakIndexKeyTerm(key.FromRiakString()));
        }
コード例 #2
0
        internal RiakIndexResult(bool includeTerms, RpbIndexResp response)
        {
            _done = response.done;

            if (response.continuation != null)
            {
                _continuation = response.continuation.FromRiakString();
            }

            if (includeTerms)
            {
                _indexKeyTerms = response.results.Select(pair =>
                                                new RiakIndexKeyTerm(pair.value.FromRiakString(),
                                                                    pair.key.FromRiakString()));
            }
            else
            {
                _indexKeyTerms = response.keys.Select(key => new RiakIndexKeyTerm(key.FromRiakString()));
            }
        }