19 #ifndef HUGO_ASYNCH_TRANSACTIONS_HPP
20 #define HUGO_ASYNCH_TRANSACTIONS_HPP
24 #include <HugoCalculator.hpp>
25 #include <HugoTransactions.hpp>
31 int loadTableAsynch(
Ndb*,
36 int pkReadRecordsAsynch(
Ndb*,
41 int pkUpdateRecordsAsynch(
Ndb*,
46 int pkDelRecordsAsynch(
Ndb*,
53 enum NDB_OPERATION {NO_INSERT, NO_UPDATE, NO_READ, NO_DELETE};
55 long transactionsCompleted;
57 struct TransactionInfo
63 int resultRowStartIndex;
68 TransactionInfo* transInfo;
75 NDB_OPERATION operationType;
79 int nextUnProcessedRecord;
81 int totalCompletedRecords;
86 void allocTransactions(
int trans,
int maxOpsPerTrans);
87 void deallocTransactions();
89 int getNextWorkTask(
int* startRecordId,
int* numRecords);
91 int defineUpdateOpsForTask(TransactionInfo* tInfo);
92 int defineTransactionForTask(TransactionInfo* tInfo, ExecType taskExecType);
94 int beginNewTask(TransactionInfo* tInfo);
95 static void callbackFunc(
int result,
NdbConnection* trans,
void* anObject);
96 void callback(
int result,
NdbConnection* trans, TransactionInfo* tInfo);
98 int executeAsynchOperation(
Ndb*,
103 NDB_OPERATION theOperation,
104 ExecType theType = Commit);