diff options
Diffstat (limited to 'src/mongo/db/catalog/collection.cpp')
-rw-r--r-- | src/mongo/db/catalog/collection.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mongo/db/catalog/collection.cpp b/src/mongo/db/catalog/collection.cpp index cd044530418..4e2c2155254 100644 --- a/src/mongo/db/catalog/collection.cpp +++ b/src/mongo/db/catalog/collection.cpp @@ -203,19 +203,17 @@ namespace { return true; } - RecordIterator* Collection::getIterator( OperationContext* txn, - const RecordId& start, - const CollectionScanParams::Direction& dir) const { + std::unique_ptr<RecordCursor> Collection::getCursor(OperationContext* txn, bool forward) const { dassert(txn->lockState()->isCollectionLockedForMode(ns().toString(), MODE_IS)); invariant( ok() ); - return _recordStore->getIterator( txn, start, dir ); + return _recordStore->getCursor(txn, forward); } - vector<RecordIterator*> Collection::getManyIterators( OperationContext* txn ) const { + vector<std::unique_ptr<RecordCursor>> Collection::getManyCursors(OperationContext* txn) const { dassert(txn->lockState()->isCollectionLockedForMode(ns().toString(), MODE_IS)); - return _recordStore->getManyIterators(txn); + return _recordStore->getManyCursors(txn); } Snapshotted<BSONObj> Collection::docFor(OperationContext* txn, const RecordId& loc) const { @@ -371,12 +369,6 @@ namespace { return loc; } - RecordFetcher* Collection::documentNeedsFetch( OperationContext* txn, - const RecordId& loc ) const { - return _recordStore->recordNeedsFetch( txn, loc ); - } - - StatusWith<RecordId> Collection::_insertDocument( OperationContext* txn, const BSONObj& docToInsert, bool enforceQuota ) { |