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 ()) { }
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(); }
/// <exception cref="System.Exception"></exception> public virtual void SetUp() { _searcher = null; }
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(); }
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; }
private bool WasRemoved(Transaction trans, Searcher s) { if (!s.FoundMatch()) { return false; } BTreePatch patch = KeyPatch(trans, s.Cursor()); return patch != null && patch.IsRemove(); }