List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:May 7 2007 8:13am
Subject:Rev 115: Renamed getNdb to createNdb to match NDB/J. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
View as plain text  
------------------------------------------------------------
revno: 115
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Mon 2007-05-07 01:12:56 -0700
message:
  Renamed getNdb to createNdb to match NDB/J. 
modified:
  swig/NdbClusterConnection.i    ndb_cluster_connecti-20070228021421-qkr4cbpxymyqdrf3-6
  swig/NdbFactory.i              ndbfactory.i-20070427052328-bwn5ewzrbigsg9v5-1
  swig/NdbOperation.i            ndboperation.i-20070228021421-qkr4cbpxymyqdrf3-3
  swig/globals.i                 globals.i-20070228021421-qkr4cbpxymyqdrf3-7
=== modified file 'swig/NdbClusterConnection.i'
--- a/swig/NdbClusterConnection.i	2007-05-05 08:08:13 +0000
+++ b/swig/NdbClusterConnection.i	2007-05-07 08:12:56 +0000
@@ -79,16 +79,16 @@
 %extend Ndb_cluster_connection {
 public:
 #if defined(SWIGJAVA)
-  %javaexception("NdbApiException") getNdb {
+  %javaexception("NdbApiException") createNdb {
 #else
-  %exception getNdb {
+  %exception createNdb {
 #endif
     $action
       if (result==NULL) { 
 	NDB_exception(NdbApiException,"Couldn't allocate an Ndb object");
       }
   }
-  Ndb* getNdb(const char* aCatalogName="", const char* aSchemaName="def") {
+  Ndb* createNdb(const char* aCatalogName="", const char* aSchemaName="def") {
     return new Ndb(self,aCatalogName,aSchemaName);
   }
 }

=== modified file 'swig/NdbFactory.i'
--- a/swig/NdbFactory.i	2007-05-05 06:53:53 +0000
+++ b/swig/NdbFactory.i	2007-05-07 08:12:56 +0000
@@ -21,27 +21,30 @@
 
 %{
 
-class NdbFactory
-{
-public:
-static Ndb_cluster_connection * createNdbClusterConnection()
-{
-  if (theConnection == NULL) { 
-    theConnection =  new Ndb_cluster_connection();
-  } 
-  return theConnection; 
-}
-static Ndb_cluster_connection * createNdbClusterConnection(const char * connectString)
-{
-  if (theConnection == NULL) { 
-    theConnection =  new Ndb_cluster_connection(connectString);
-  }
-  return theConnection; 
-}
-
-};
-
-%}
+  class NdbFactory
+  {
+    
+  public:
+    static Ndb_cluster_connection * createNdbClusterConnection()
+      {
+	static Ndb_cluster_connection * theConnection = NULL;
+	if (theConnection == NULL) { 
+	  theConnection =  new Ndb_cluster_connection();
+	} 
+	return theConnection; 
+      }
+    static Ndb_cluster_connection * createNdbClusterConnection(const char *
connectString)
+      {
+	static Ndb_cluster_connection * theConnection = NULL;
+	if (theConnection == NULL) { 
+	  theConnection =  new Ndb_cluster_connection(connectString);
+	}
+	return theConnection; 
+      }
+    
+  };
+  
+  %}
 
 class NdbFactory
 {

=== modified file 'swig/NdbOperation.i'
--- a/swig/NdbOperation.i	2007-05-06 04:28:40 +0000
+++ b/swig/NdbOperation.i	2007-05-07 08:12:56 +0000
@@ -391,6 +391,12 @@
     return retval;
   }
 
+  int setInt(const char* anAttrName, Int32 intVal) { 
+    return self->setValue(anAttrName,intVal);
+  }
+  int setInt(Uint32 anAttrId, Int32 intVal) { 
+    return self->setValue(anAttrId,intVal);
+  }
   int setDatetime(const char* anAttrName, MYSQL_TIME * anInputDateTime) { 
 
     const NdbDictionary::Column * theColumn =
self->getTable()->getColumn(anAttrName);
@@ -401,7 +407,7 @@
     return self->setValue(anAttrName,dtval);
 
   }
-/*  int setDatetime(Uint32 anAttrId, MYSQL_TIME * anInputDateTime) { 
+  int setDatetime(Uint32 anAttrId, MYSQL_TIME * anInputDateTime) { 
     
     const NdbDictionary::Column * theColumn =
self->getTable()->getColumn(anAttrId);
     
@@ -409,7 +415,7 @@
     if (dtval == 1) 
       return dtval;
     return  self->setValue(anAttrId,dtval);
-    }*/
+    }
   int setTimestamp(const char* anAttrName, Int64 anInputTimestamp) { 
 
     return self->setValue(anAttrName,anInputTimestamp);

=== modified file 'swig/globals.i'
--- a/swig/globals.i	2007-05-06 02:34:17 +0000
+++ b/swig/globals.i	2007-05-07 08:12:56 +0000
@@ -1,3 +1,4 @@
+// -*- mode: c++ -*- 
 
 %include "typemaps.i"
 %include "exception.i"
@@ -23,7 +24,6 @@
     NoSuchTableException,
 };
 
-Ndb_cluster_connection * theConnection = NULL;
 
   class BaseCallback { 
 

Thread
Rev 115: Renamed getNdb to createNdb to match NDB/J. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmergeMonty Taylor7 May