1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

wl1671 - Sorted scan

This commit is contained in:
unknown
2004-05-26 13:24:14 +02:00
parent d887ce18a4
commit 66011d0b8c
78 changed files with 3523 additions and 5330 deletions

View File

@ -30,17 +30,15 @@
#define NdbResultSet_H
#include <NdbCursorOperation.hpp>
#include <NdbIndexOperation.hpp>
#include <NdbScanOperation.hpp>
/**
* @class NdbResultSet
* @brief NdbResultSet contains a NdbCursorOperation.
* @brief NdbResultSet contains a NdbScanOperation.
*/
class NdbResultSet
{
friend class NdbCursorOperation;
friend class NdbScanOperation;
public:
@ -93,22 +91,57 @@ public:
*/
int nextResult(bool fetchAllowed = true);
/**
* Close result set (scan)
*/
void close();
/**
* Transfer scan operation to an updating transaction. Use this function
* when a scan has found a record that you want to update.
* 1. Start a new transaction.
* 2. Call the function takeOverForUpdate using your new transaction
* as parameter, all the properties of the found record will be copied
* to the new transaction.
* 3. When you execute the new transaction, the lock held by the scan will
* be transferred to the new transaction(it's taken over).
*
* @note You must have started the scan with openScanExclusive
* to be able to update the found tuple.
*
* @param updateTrans the update transaction connection.
* @return an NdbOperation or NULL.
*/
NdbOperation* updateTuple();
NdbOperation* updateTuple(NdbConnection* takeOverTransaction);
NdbOperation* updateTuple(NdbConnection* updateTrans);
/**
* Transfer scan operation to a deleting transaction. Use this function
* when a scan has found a record that you want to delete.
* 1. Start a new transaction.
* 2. Call the function takeOverForDelete using your new transaction
* as parameter, all the properties of the found record will be copied
* to the new transaction.
* 3. When you execute the new transaction, the lock held by the scan will
* be transferred to the new transaction(its taken over).
*
* @note You must have started the scan with openScanExclusive
* to be able to delete the found tuple.
*
* @param deleteTrans the delete transaction connection.
* @return an NdbOperation or NULL.
*/
int deleteTuple();
int deleteTuple(NdbConnection* takeOverTransaction);
private:
NdbResultSet(NdbCursorOperation*);
NdbResultSet(NdbScanOperation*);
~NdbResultSet();
void init();
NdbCursorOperation* m_operation;
NdbScanOperation* m_operation;
};
#endif