| 676 | } |
| 677 | |
| 678 | bool DatabaseConfiguration::clear(KeyRangeRef keys) { |
| 679 | makeConfigurationMutable(); |
| 680 | auto& mc = mutableConfiguration.get(); |
| 681 | mc.erase(mc.lower_bound(keys.begin.toString()), mc.lower_bound(keys.end.toString())); |
| 682 | |
| 683 | // FIXME: More efficient |
| 684 | bool wasValid = isValid(); |
| 685 | resetInternal(); |
| 686 | for (auto c = mc.begin(); c != mc.end(); ++c) |
| 687 | setInternal(c->first, c->second); |
| 688 | return wasValid && !isValid(); |
| 689 | } |
| 690 | |
| 691 | Optional<ValueRef> DatabaseConfiguration::get(KeyRef key) const { |
| 692 | if (mutableConfiguration.present()) { |