Exemplo n.º 1
0
        public string AllDocs()
        {
            string result = "";

            LevelDB.Iterator sequenceList = sequenceStore.NewIterator(ReadOptions.Default);

            while (sequenceList.Valid())
            {
                result += sequenceList.Value();
            }

            // We have to close the iterator
            sequenceList = null;

            return(result);
        }
Exemplo n.º 2
0
        public void IsValid()
        {
            Database.Put(null, "key1", "value1");

            var iter = new Iterator(Database, null);
            iter.SeekToLast();
            Assert.IsTrue(iter.IsValid);

            iter.Next();
            Assert.IsFalse(iter.IsValid);
        }