Storage Engine API
mongo::WiredTigerRecordStoreStandardCursor Class Referencefinal

#include <wiredtiger_record_store.h>

Inheritance diagram for mongo::WiredTigerRecordStoreStandardCursor:
mongo::WiredTigerRecordStoreCursorBase mongo::SeekableRecordCursor mongo::RecordCursor

Public Member Functions

 WiredTigerRecordStoreStandardCursor (OperationContext *opCtx, const WiredTigerRecordStore &rs, bool forward=true)
 
- Public Member Functions inherited from mongo::WiredTigerRecordStoreCursorBase
 WiredTigerRecordStoreCursorBase (OperationContext *opCtx, const WiredTigerRecordStore &rs, bool forward)
 
boost::optional< Recordnext ()
 Moves forward and returns the new data or boost::none if there is no more data. More...
 
boost::optional< RecordseekExact (const RecordId &id)
 Seeks to a Record with the provided id. More...
 
void save ()
 Prepares for state changes in underlying data in a way that allows the cursor's current position to be restored. More...
 
void saveUnpositioned ()
 Prepares for state changes in underlying data without necessarily saving the current state. More...
 
bool restore ()
 Recovers from potential state changes in underlying data. More...
 
void detachFromOperationContext ()
 Detaches from the OperationContext and releases any storage-engine state. More...
 
void reattachToOperationContext (OperationContext *opCtx)
 Reattaches to the OperationContext and reacquires any storage-engine state. More...
 
- Public Member Functions inherited from mongo::SeekableRecordCursor
virtual std::unique_ptr< RecordFetcherfetcherForId (const RecordId &id) const
 Returns a RecordFetcher if needed to fetch the provided Record or none if unneeded. More...
 
- Public Member Functions inherited from mongo::RecordCursor
virtual ~RecordCursor ()=default
 
virtual void invalidate (OperationContext *opCtx, const RecordId &id)
 Inform the cursor that this id is being invalidated. More...
 
virtual std::unique_ptr< RecordFetcherfetcherForNext () const
 Returns a RecordFetcher if needed for a call to next() or none if unneeded. More...
 

Protected Member Functions

virtual RecordId getKey (WT_CURSOR *cursor) const override
 
virtual void setKey (WT_CURSOR *cursor, RecordId id) const override
 
virtual bool hasWrongPrefix (WT_CURSOR *cursor, RecordId *id) const override
 Callers must have already checked the return value of a positioning method against 'WT_NOTFOUND'. More...
 
virtual void initCursorToBeginning ()
 Called when restoring a cursor that has not been advanced. More...
 

Additional Inherited Members

- Protected Attributes inherited from mongo::WiredTigerRecordStoreCursorBase
const WiredTigerRecordStore_rs
 
OperationContext * _opCtx
 
const bool _forward
 
bool _skipNextAdvance = false
 
boost::optional< WiredTigerCursor_cursor
 
bool _eof = false
 
RecordId _lastReturnedId
 

Constructor & Destructor Documentation

◆ WiredTigerRecordStoreStandardCursor()

mongo::WiredTigerRecordStoreStandardCursor::WiredTigerRecordStoreStandardCursor ( OperationContext *  opCtx,
const WiredTigerRecordStore rs,
bool  forward = true 
)

Member Function Documentation

◆ getKey()

RecordId mongo::WiredTigerRecordStoreStandardCursor::getKey ( WT_CURSOR *  cursor) const
overrideprotectedvirtual

◆ hasWrongPrefix()

bool mongo::WiredTigerRecordStoreStandardCursor::hasWrongPrefix ( WT_CURSOR *  cursor,
RecordId *  id 
) const
overrideprotectedvirtual

Callers must have already checked the return value of a positioning method against 'WT_NOTFOUND'.

This method allows for additional predicates to be considered on a validly positioned cursor. 'id' is an out parameter. Implementations are not required to fill it in. It's simply a possible optimization to avoid a future 'getKey' call if 'hasWrongPrefix' already did one.

Implements mongo::WiredTigerRecordStoreCursorBase.

◆ initCursorToBeginning()

virtual void mongo::WiredTigerRecordStoreStandardCursor::initCursorToBeginning ( )
inlineprotectedvirtual

Called when restoring a cursor that has not been advanced.

Implements mongo::WiredTigerRecordStoreCursorBase.

◆ setKey()

void mongo::WiredTigerRecordStoreStandardCursor::setKey ( WT_CURSOR *  cursor,
RecordId  id 
) const
overrideprotectedvirtual

The documentation for this class was generated from the following files: