List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:November 1 2007 4:35pm
Subject:Rev 209: Added a long version of startTransaction. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3

------------------------------------------------------------
revno: 209
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: telco-6.3
timestamp: Thu 2007-11-01 16:35:16 +0000
message:
  Added a long version of startTransaction.
modified:
  java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
  swig/Ndb.i                     ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
=== modified file 'java/com/mysql/cluster/ndbj/Ndb.java'
--- a/java/com/mysql/cluster/ndbj/Ndb.java	2007-11-01 14:35:45 +0000
+++ b/java/com/mysql/cluster/ndbj/Ndb.java	2007-11-01 16:35:16 +0000
@@ -139,12 +139,15 @@
 
 	public int pollNdb() throws NdbApiException;
 
-	public NdbTransactionImpl startTransaction(String aTableName, short keyData) throws
NdbApiException;
+	public NdbTransactionImpl startTransaction(String aTableName, short keyData) throws
NdbApiException
+;
+	public NdbTransactionImpl startTransaction(String aTableName, long keyData) throws
NdbApiException;
 
 	public NdbTransactionImpl startTransaction(NdbTable table, String anInputString) throws
NdbApiException;
 
 	public NdbTransactionImpl startTransaction(NdbTable table, short keyData) throws
NdbApiException;
 
 	public NdbTransactionImpl startTransaction(NdbTable table, int keyData) throws
NdbApiException;
+	public NdbTransactionImpl startTransaction(NdbTable table, long keyData) throws
NdbApiException;
 
 }
\ No newline at end of file

=== modified file 'swig/Ndb.i'
--- a/swig/Ndb.i	2007-11-01 14:35:45 +0000
+++ b/swig/Ndb.i	2007-11-01 16:35:16 +0000
@@ -57,8 +57,6 @@
   int  pollNdb(int aMillisecondNumber = WAITFOR_RESPONSE_TIMEOUT,
               int minNoOfEventsToWakeup = 1);
 
-//  int pollEvents(int aMillisecondNumber, Uint64 *latestGCI= 0);
-
   %ndbexception("NdbApiException") { 
     $action
       if (result==NULL) { 
@@ -70,37 +68,6 @@
   class NdbDictDictionary* getDictionary();
   NdbEventOperation* createEventOperation(const char* eventName);
 
-//  const NdbEventOperation*
-//    getGCIEventOperations(Uint32* iter, Uint32* event_types);
-
-
-
-
-/*  %ndbexception("NdbApiException") init { 
-    $action
-      if (result) { 
-	NDB_exception(NdbApiException,"Cluster not ready");
-      }
-  }
-  int init(int maxNoOfTransactions = 4);
-*/
-/*  %ndbexception("NdbApiException") getAutoIncrementValue {
-    $action
-      if (result == 0) { 
-	NdbError err = arg1->getNdbError();
-	NDB_exception(NdbApiException,err.message);
-      }
-  }
-  %rename(getAutoIncrementValueUint64) getAutoIncrementValue(const char*, Uint64 &,
Uint32); 
-  %rename(getAutoIncrementValueUint64) getAutoIncrementValue(const NdbDictTable *, Uint64
&, Uint32); 
-  int getAutoIncrementValue(const char* aTableName, 
-                            Uint64 & OUTPUT, Uint32 cacheSize);
-  int getAutoIncrementValue(const NdbDictTable * aTable, 
-                            Uint64 & OUTPUT, Uint32 cacheSize);
-*/
-
-
-
 };     
 
 %extend Ndb {
@@ -195,13 +162,26 @@
     return self->startTransaction(myTable,keys);
   }
   NdbTransaction* startTransaction(const char* aTableName, 
-                                   int keyData) {
-    const NdbDictDictionary *myDict = self->getDictionary();
-    const NdbDictTable *myTable = myDict->getTable(aTableName);
-
-    Ndb::Key_part_ptr keys[2];
-    keys[0].ptr=(const void*)&keyData;
-    keys[0].len=sizeof(int);
+                                   Int32 keyData) {
+    const NdbDictDictionary *myDict = self->getDictionary();
+    const NdbDictTable *myTable = myDict->getTable(aTableName);
+
+    Ndb::Key_part_ptr keys[2];
+    keys[0].ptr=(const void*)&keyData;
+    keys[0].len=sizeof(Int32);
+    keys[1].ptr=NULL;
+    keys[1].len=0; 
+
+    return self->startTransaction(myTable,keys);
+  }
+  NdbTransaction* startTransaction(const char* aTableName, 
+                                   Uint32 keyData) {
+    const NdbDictDictionary *myDict = self->getDictionary();
+    const NdbDictTable *myTable = myDict->getTable(aTableName);
+
+    Ndb::Key_part_ptr keys[2];
+    keys[0].ptr=(const void*)&keyData;
+    keys[0].len=sizeof(Uint32);
     keys[1].ptr=NULL;
     keys[1].len=0; 
 
@@ -229,11 +209,22 @@
     return self->startTransaction(table,keys);
   }
   NdbTransaction* startTransaction(const NdbDictTable* table, 
-                                   int keyData) {
-
-    Ndb::Key_part_ptr keys[2];
-    keys[0].ptr=(const void*)&keyData;
-    keys[0].len=sizeof(int);
+                                   Int32 keyData) {
+
+    Ndb::Key_part_ptr keys[2];
+    keys[0].ptr=(const void*)&keyData;
+    keys[0].len=sizeof(Int32);
+    keys[1].ptr=NULL;
+    keys[1].len=0; 
+
+    return self->startTransaction(table,keys);
+  }
+  NdbTransaction* startTransaction(const NdbDictTable* table, 
+                                   Uint32 keyData) {
+
+    Ndb::Key_part_ptr keys[2];
+    keys[0].ptr=(const void*)&keyData;
+    keys[0].len=sizeof(Uint32);
     keys[1].ptr=NULL;
     keys[1].len=0; 
 

Thread
Rev 209: Added a long version of startTransaction. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3Monty Taylor1 Nov