예제 #1
0
        private BTreePointer SearchBTree(BTree bTree, Slot slot, SearchTarget target)
        {
            BTreeNodeSearchResult searchResult = bTree.SearchLeaf(Transaction(), slot, target
                                                                  );

            return(searchResult.FirstValidPointer());
        }
예제 #2
0
        private IBTreeRange FieldIndexKeySearch(Transaction trans, BTree btree, object key
                                                )
        {
            // SearchTarget should not make a difference, HIGHEST is faster
            BTreeNodeSearchResult start = btree.SearchLeafByObject(trans, FieldIndexKey(0, key
                                                                                        ), SearchTarget.Lowest);
            BTreeNodeSearchResult end = btree.SearchLeafByObject(trans, FieldIndexKey(int.MaxValue
                                                                                      , key), SearchTarget.Lowest);

            return(start.CreateIncludingRange(end));
        }
예제 #3
0
        public virtual IBTreeRange Search(Transaction transaction, object value)
        {
            AssertHasIndex();
            object transActionalValue = Handlers4.WrapWithTransactionContext(transaction, value
                                                                             , GetHandler());
            BTreeNodeSearchResult lowerBound = SearchLowerBound(transaction, transActionalValue
                                                                );
            BTreeNodeSearchResult upperBound = SearchUpperBound(transaction, transActionalValue
                                                                );

            return(lowerBound.CreateIncludingRange(upperBound));
        }