| 469 | } |
| 470 | |
| 471 | void LockDb::SeekToFirst() { |
| 472 | if (Type::MAP == type_) { |
| 473 | map_it_ = map_.cbegin(); |
| 474 | } else if (Type::LEVELDB == type_) { |
| 475 | leveldb::ReadOptions options; |
| 476 | // force checksum verification |
| 477 | options.verify_checksums = leveldb_checks_; |
| 478 | leveldb_it_ = leveldb_->NewIterator(options); |
| 479 | leveldb_it_->SeekToFirst(); |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | void LockDb::Next() { |
| 484 | if (Type::MAP == type_) { |