internal BTreeNodeSearchResult(Transaction trans, ByteArrayBuffer nodeReader, BTree
			 btree, Searcher searcher, BTreeNode node) : this(trans, btree, NextPointerIf(PointerOrNull
			(trans, nodeReader, node, searcher.Cursor()), searcher.IsGreater()), searcher.FoundMatch
			())
		{
		}
Beispiel #2
0
 private int Search(int[] values, int value)
 {
     _searcher = new Searcher(SearchTarget.Any, values.Length);
     while (_searcher.Incomplete())
     {
         _searcher.ResultIs(values[_searcher.Cursor()] - value);
     }
     return _searcher.Cursor();
 }
Beispiel #3
0
 /// <exception cref="System.Exception"></exception>
 public virtual void SetUp()
 {
     _searcher = null;
 }
Beispiel #4
0
 public virtual void TestEmptySet()
 {
     _searcher = new Searcher(SearchTarget.Any, 0);
     if (_searcher.Incomplete())
     {
         Assert.Fail();
     }
     Assert.AreEqual(0, _searcher.Cursor());
 }
		private int Search(int[] values, SearchTarget target)
		{
			_searcher = new Searcher(target, values.Length);
			while (_searcher.Incomplete())
			{
				_searcher.ResultIs(values[_searcher.Cursor()] - SearchFor);
			}
			return _searcher.Cursor();
		}
Beispiel #6
0
		private Searcher Search(Transaction trans, IPreparedComparison preparedComparison
			, ByteArrayBuffer reader, SearchTarget target)
		{
			Searcher s = new Searcher(target, _count);
			if (CanWrite())
			{
				while (s.Incomplete())
				{
					s.ResultIs(CompareInWriteMode(preparedComparison, s.Cursor()));
				}
			}
			else
			{
				while (s.Incomplete())
				{
					s.ResultIs(CompareInReadMode(trans, preparedComparison, reader, s.Cursor()));
				}
			}
			return s;
		}
Beispiel #7
0
		private bool WasRemoved(Transaction trans, Searcher s)
		{
			if (!s.FoundMatch())
			{
				return false;
			}
			BTreePatch patch = KeyPatch(trans, s.Cursor());
			return patch != null && patch.IsRemove();
		}
 internal BTreeNodeSearchResult(Transaction trans, ByteArrayBuffer nodeReader, BTree
                                btree, Searcher searcher, BTreeNode node) : this(trans, btree, NextPointerIf(PointerOrNull
                                                                                                                 (trans, nodeReader, node, searcher.Cursor()), searcher.IsGreater()), searcher.FoundMatch
                                                                                     ())
 {
 }