示例#1
0
        public JToken Put(string sortKey, JToken item)
        {
            if (data.TryGetValue(sortKey, out var value))
            {
                return(data.TryUpdate(sortKey, item)
                    ? item
                    : value);
            }

            return(data.TryAdd(sortKey, item)
                ? item
                : null);
        }
示例#2
0
        public IEnumerable <ItemPointer> Query(QueryOperation query)
        {
            if (query.IndexName != null && indexes.TryGetValue(query.IndexName, out var index))
            {
                return(index.Query(query));
            }

            return(new ItemPointer[] {});
        }