コード例 #1
0
        internal static ByteBuffer FindLastKeyWithPrefix(ByteBuffer keyBytes, ByteBuffer endKeyBytes,
                                                         IKeyValueDBTransaction keyValueTr, KeyValueDBTransactionProtector keyValueTrProtector)
        {
            var buffer = ByteBuffer.NewEmpty();

            buffer = buffer.ResizingAppend(keyBytes).ResizingAppend(endKeyBytes);
            keyValueTrProtector.Start();
            keyValueTr.SetKeyPrefix(buffer);
            if (!keyValueTr.FindLastKey())
            {
                return(endKeyBytes);
            }
            var key = keyValueTr.GetKeyIncludingPrefix();

            return(key.Slice(keyBytes.Length));
        }
コード例 #2
0
 public ByteBuffer GetKeyBytes()
 {
     return(_keyValueTr.GetKeyIncludingPrefix());
 }