mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
wl1671 - Sorted scan
This commit is contained in:
@ -17,77 +17,4 @@
|
||||
#ifndef NdbCursorOperation_H
|
||||
#define NdbCursorOperation_H
|
||||
|
||||
#include <NdbOperation.hpp>
|
||||
|
||||
class NdbResultSet;
|
||||
|
||||
/**
|
||||
* @class NdbCursorOperation
|
||||
* @brief Operation using cursors
|
||||
*/
|
||||
class NdbCursorOperation : public NdbOperation
|
||||
{
|
||||
friend class NdbResultSet;
|
||||
friend class NdbConnection;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Type of cursor
|
||||
*/
|
||||
enum CursorType {
|
||||
NoCursor = 0,
|
||||
ScanCursor = 1,
|
||||
IndexCursor = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* Lock when performing scan
|
||||
*/
|
||||
enum LockMode {
|
||||
LM_Read = 0,
|
||||
LM_Exclusive = 1,
|
||||
LM_CommittedRead = 2,
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
|
||||
LM_Dirty = 2
|
||||
#endif
|
||||
};
|
||||
|
||||
virtual CursorType cursorType() = 0;
|
||||
|
||||
/**
|
||||
* readTuples returns a NdbResultSet where tuples are stored.
|
||||
* Tuples are not stored in NdbResultSet until execute(NoCommit)
|
||||
* has been executed and nextResult has been called.
|
||||
*
|
||||
* @param parallel Scan parallelism
|
||||
* @param LockMode Scan lock handling
|
||||
* @returns NdbResultSet.
|
||||
*/
|
||||
virtual NdbResultSet* readTuples(unsigned parallel = 0,
|
||||
LockMode = LM_Read ) = 0;
|
||||
|
||||
inline NdbResultSet* readTuplesExclusive(int parallell = 0){
|
||||
return readTuples(parallell, LM_Exclusive);
|
||||
}
|
||||
|
||||
protected:
|
||||
NdbCursorOperation(Ndb* aNdb);
|
||||
|
||||
~NdbCursorOperation();
|
||||
|
||||
void cursInit();
|
||||
|
||||
virtual int executeCursor(int ProcessorId) = 0;
|
||||
|
||||
NdbResultSet* getResultSet();
|
||||
NdbResultSet* m_resultSet;
|
||||
|
||||
private:
|
||||
|
||||
virtual int nextResult(bool fetchAllowed) = 0;
|
||||
|
||||
virtual void closeScan() = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user