public Dictionary <string, string> Gets(IEnumerable <string> keys) { var maps = new Dictionary <string, string>(); if (keys.xIsEmpty()) { return(maps); } var bytesKeys = new List <byte[]>(); keys.xForEach(key => { bytesKeys.Add(key.xToBytes()); }); var keyvalues = _db.MultiGet(bytesKeys.ToArray()); keyvalues.xForEach(kv => { maps.Add(kv.Key.xToString(), kv.Value.xToString()); }); return(maps); }
public KeyValuePair <byte[], byte[]>[] this[byte[][] keys] => Db.MultiGet(keys);
public KeyValuePair <byte[], byte[]>[] this[byte[][] keys] => _rocksDb.MultiGet(keys, keys.Select(k => _columnFamily).ToArray());
public IDictionary <byte[], byte[]> GetMany(IEnumerable <byte[]> keys) { _ThrowIfNotInitialized(); return(_rocksDb.MultiGet(keys.ToArray()).ToDictionary(kv => kv.Key, k => k.Value)); }
public Task <IDictionary <byte[], byte[]> > GetMany(IEnumerable <byte[]> keys) { return(Task.FromResult <IDictionary <byte[], byte[]> >(_rocksDb.MultiGet(keys.ToArray()) .ToDictionary(kv => kv.Key, k => k.Value))); }