public virtual void Clear(Transaction transaction) { BTreePointer currentPointer = FirstPointer(transaction); while (currentPointer != null && currentPointer.IsValid()) { BTreeNode node = currentPointer.Node(); int index = currentPointer.Index(); node.Remove(transaction, index); currentPointer = currentPointer.Next(); } }
public virtual object Remove(Transaction trans, object key) { BTreePointer bTreePointer = SearchPointer(trans, key); if (bTreePointer == null) { return(null); } object result = bTreePointer.Key(); Enlist(trans); IPreparedComparison preparedComparison = KeyHandler().PrepareComparison(trans.Context (), key); BTreeNode node = bTreePointer.Node(); node.Remove(trans, preparedComparison, key, bTreePointer.Index()); ConvertCacheEvictedNodesToReadMode(); return(result); }