| 569 | } |
| 570 | |
| 571 | auto BTreeDatabase::BTreeImpl::indexSplit(Index const& index) -> Maybe<pair<Key, Index>> { |
| 572 | if (index->pointerCount() <= parent->maxIndexPointers()) |
| 573 | return {}; |
| 574 | |
| 575 | auto right = make_shared<IndexNode>(); |
| 576 | right->self = InvalidBlockIndex; |
| 577 | Key k = index->split(*right, (index->pointerCount() + 1) / 2); |
| 578 | return make_pair(k, right); |
| 579 | } |
| 580 | |
| 581 | auto BTreeDatabase::BTreeImpl::storeIndex(Index index) -> Pointer { |
| 582 | if (index->self != InvalidBlockIndex) { |
nothing calls this directly
no test coverage detected