Exemplo n.º 1
0
        public static void Dump(IntPtr db)
        {
            var    options = Native.leveldb_readoptions_create();
            IntPtr iter    = Native.leveldb_create_iterator(db, options);

            for (Native.leveldb_iter_seek_to_first(iter);
                 Native.leveldb_iter_valid(iter);
                 Native.leveldb_iter_next(iter))
            {
                byte[] key   = Native.leveldb_iter_key_raw(iter);
                byte[] value = Native.leveldb_iter_value_raw(iter);
                Console.WriteLine("'{0}' => '{1}'", key, value);
            }
            Native.leveldb_iter_destroy(iter);
        }