At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
------------------------------------------------------------
revno: 127
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Wed 2007-07-25 10:20:31 -0700
message:
Renamed RecAttr methods to not be ugly.
Fixed Ruby for the ndb/j merge stuff.
Fixed Python for the ndb/j merge stuff.
modified:
java/com/mysql/cluster/ndbapi/examples/TestBaseCallback.java
testbasecallback.jav-20070505081526-30y7xsbok35xemlg-1
java/com/mysql/cluster/ndbapi/examples/TestCallback.java
testcallback.java-20070305174931-p3qddjy9i6h6y1f3-3
java/com/mysql/cluster/ndbapi/examples/test.java
test.java-20070130002924-gcvhapmvh0lu1pkd-4
java/com/mysql/cluster/ndbapi/examples/testasync.java
test2.java-20070305174931-p3qddjy9i6h6y1f3-4
java/com/mysql/cluster/ndbapi/examples/testdirasync.java
testdirasync.java-20070505081526-30y7xsbok35xemlg-2
java/com/mysql/cluster/ndbj/NdbBlobImpl.java
ndbblobimpl.java-20070517181935-98huwjarzuh25b30-8
java/com/mysql/cluster/ndbj/NdbFactory.java
ndbfactory.java-20070517181935-98huwjarzuh25b30-13
java/com/mysql/cluster/ndbj/NdbRecAttr.java
ndbrecattr.java-20070520091932-flfya9c98z1ep0j3-5
java/com/mysql/cluster/ndbj/NdbRecAttrImpl.java
ndbrecattrimpl.java-20070520091932-flfya9c98z1ep0j3-4
java/com/mysql/cluster/ndbj/NdbResultSetImpl.java
ndbresultsetimpl.jav-20070517181935-98huwjarzuh25b30-22
perl/test.pl
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-perl5%2ftest.pl
python/mgmapi.i
svn-v2:10@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fmgm.i
python/ndbapi.i
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2fndb.i
python/test.py
svn-v2:1@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-python%2ftest.py
python/test2.py test2.py-20070130002952-p0v0nvxmb1bo34n3-1
python/testasynch.py testasynch.py-20070227185119-f8ow9m7i9zfgr5jr-1
ruby/mgmapi.i mgmapi.i-20070415091411-plc5gtpiwg93c2lx-1
ruby/ndbapi.i ndb.i-20070228212451-7arjxk90dkwcn5xr-3
ruby/testasync.rb testasync.rb-20070503085248-pb7j4e3h32mb81vs-1
ruby/testreaddt.rb testreaddt.rb-20070521223831-70qncxglgiscqe0a-1
ruby/testselectcount.rb testselectcount.rb-20070521223831-70qncxglgiscqe0a-2
swig/NdbRecAttr.i ndbrecattr.i-20070228021421-qkr4cbpxymyqdrf3-4
=== modified file 'java/com/mysql/cluster/ndbapi/examples/TestBaseCallback.java'
--- a/java/com/mysql/cluster/ndbapi/examples/TestBaseCallback.java 2007-05-21 00:08:02
+0000
+++ b/java/com/mysql/cluster/ndbapi/examples/TestBaseCallback.java 2007-07-25 17:20:31
+0000
@@ -14,6 +14,6 @@
public void callback(int result, NdbTransaction myTrans) {
System.out.println("result " + result);
- System.out.println("value " + this.myRecAttr.int32_value());
+ System.out.println("value " + this.myRecAttr.getInt32());
};
}
=== modified file 'java/com/mysql/cluster/ndbapi/examples/TestCallback.java'
--- a/java/com/mysql/cluster/ndbapi/examples/TestCallback.java 2007-05-21 00:08:02 +0000
+++ b/java/com/mysql/cluster/ndbapi/examples/TestCallback.java 2007-07-25 17:20:31 +0000
@@ -14,6 +14,6 @@
public void callback(int result, NdbTransaction myTrans) {
System.out.println("result " + result);
- System.out.println("value " + this.myRecAttr.int32_value());
+ System.out.println("value " + this.myRecAttr.getInt32());
};
}
=== modified file 'java/com/mysql/cluster/ndbapi/examples/test.java'
--- a/java/com/mysql/cluster/ndbapi/examples/test.java 2007-05-21 00:08:02 +0000
+++ b/java/com/mysql/cluster/ndbapi/examples/test.java 2007-07-25 17:20:31 +0000
@@ -203,7 +203,7 @@
break;
}
- int random_id = myRecAttr.int32_value();
+ int random_id = myRecAttr.getInt32();
ids.add(random_id);
}
@@ -248,7 +248,7 @@
System.exit(-1);
}
- foo=myRecAttr.int32_value();
+ foo=myRecAttr.getInt32();
myTrans.close();
}
endTime = new Date(System.currentTimeMillis());
=== modified file 'java/com/mysql/cluster/ndbapi/examples/testasync.java'
--- a/java/com/mysql/cluster/ndbapi/examples/testasync.java 2007-05-21 00:08:02 +0000
+++ b/java/com/mysql/cluster/ndbapi/examples/testasync.java 2007-07-25 17:20:31 +0000
@@ -191,7 +191,7 @@
break;
}
- int random_id = myRecAttr.int32_value();
+ int random_id = myRecAttr.getInt32();
ids.add(random_id);
}
@@ -236,7 +236,7 @@
System.exit(-1);
}
- foo=myRecAttr.int32_value();
+ foo=myRecAttr.getInt32();
myTrans.close();
}
endTime = new Date(System.currentTimeMillis());
=== modified file 'java/com/mysql/cluster/ndbapi/examples/testdirasync.java'
--- a/java/com/mysql/cluster/ndbapi/examples/testdirasync.java 2007-05-21 00:08:02 +0000
+++ b/java/com/mysql/cluster/ndbapi/examples/testdirasync.java 2007-07-25 17:20:31 +0000
@@ -188,7 +188,7 @@
break;
}
- int random_id = myRecAttr.int32_value();
+ int random_id = myRecAttr.getInt32();
ids.add(random_id);
}
@@ -233,7 +233,7 @@
System.exit(-1);
}
- foo=myRecAttr.int32_value();
+ foo=myRecAttr.getInt32();
myTrans.close();
}
endTime = new Date(System.currentTimeMillis());
=== modified file 'java/com/mysql/cluster/ndbj/NdbBlobImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbBlobImpl.java 2007-05-23 01:05:32 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbBlobImpl.java 2007-07-25 17:20:31 +0000
@@ -326,26 +326,83 @@
return this;
}
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#char_value()
- */
- public char char_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#double_value()
- */
- public double double_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#float_value()
- */
- public float float_value() throws NdbApiException {
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getChar()
+ */
+ public char getChar() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getDouble()
+ */
+ public double getDouble() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getFloat()
+ */
+ public float getFloat() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getInt32()
+ */
+ public int getInt32() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getInt64()
+ */
+ public long getInt64() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getShort()
+ */
+ public short getShort() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUchar()
+ */
+ public short getUchar() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUint32()
+ */
+ public long getUint32() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUint64()
+ */
+ public BigInteger getUint64() throws NdbApiException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUshort()
+ */
+ public int getUshort() throws NdbApiException {
// TODO Auto-generated method stub
return 0;
}
@@ -358,21 +415,6 @@
return 0;
}
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#int32_value()
- */
- public int int32_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#int64_value()
- */
- public long int64_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
/* (non-Javadoc)
* @see com.mysql.cluster.ndbj.NdbRecAttr#isNULL()
@@ -386,45 +428,6 @@
return -1;
}
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#short_value()
- */
- public short short_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_32_value()
- */
- public long u_32_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_64_value()
- */
- public BigInteger u_64_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_char_value()
- */
- public short u_char_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_short_value()
- */
- public int u_short_value() throws NdbApiException {
- // TODO Auto-generated method stub
- return 0;
- }
/* (non-Javadoc)
* @see com.mysql.cluster.ndbj.NdbRecAttr#getDatetime()
=== modified file 'java/com/mysql/cluster/ndbj/NdbFactory.java'
--- a/java/com/mysql/cluster/ndbj/NdbFactory.java 2007-07-03 18:04:19 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbFactory.java 2007-07-25 17:20:31 +0000
@@ -411,6 +411,7 @@
return op;
}
+ //static NdbEventOperation createNdbEventOperation();
/**
* Used internally by NDB/J.
* @param ptr
=== modified file 'java/com/mysql/cluster/ndbj/NdbRecAttr.java'
--- a/java/com/mysql/cluster/ndbj/NdbRecAttr.java 2007-05-20 09:20:25 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbRecAttr.java 2007-07-25 17:20:31 +0000
@@ -15,21 +15,21 @@
/**
* @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#char_value()
- */
- public abstract char char_value() throws NdbApiException ;
-
- /**
- * @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#double_value()
- */
- public abstract double double_value() throws NdbApiException ;
-
- /**
- * @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#float_value()
- */
- public abstract float float_value() throws NdbApiException ;
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getChar()
+ */
+ public abstract char getChar() throws NdbApiException ;
+
+ /**
+ * @return
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getDouble()
+ */
+ public abstract double getDouble() throws NdbApiException ;
+
+ /**
+ * @return
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getFloat()
+ */
+ public abstract float getFloat() throws NdbApiException ;
/**
* @return
@@ -39,15 +39,15 @@
/**
* @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#int32_value()
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getInt32()
*/
- public abstract int int32_value() throws NdbApiException ;
+ public abstract int getInt32() throws NdbApiException ;
/**
* @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#int64_value()
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getInt64()
*/
- public abstract long int64_value() throws NdbApiException ;
+ public abstract long getInt64() throws NdbApiException ;
/**
* @return
@@ -57,33 +57,33 @@
/**
* @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#short_value()
- */
- public abstract short short_value() throws NdbApiException ;
-
- /**
- * @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#u_32_value()
- */
- public abstract long u_32_value() throws NdbApiException ;
-
- /**
- * @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#u_64_value()
- */
- public abstract BigInteger u_64_value() throws NdbApiException ;
-
- /**
- * @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#u_char_value()
- */
- public abstract short u_char_value() throws NdbApiException ;
-
- /**
- * @return
- * @see com.mysql.cluster.ndbapi.NdbRecAttr#u_short_value()
- */
- public abstract int u_short_value() throws NdbApiException ;
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getShort()
+ */
+ public abstract short getShort() throws NdbApiException ;
+
+ /**
+ * @return
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getUint32()
+ */
+ public abstract long getUint32() throws NdbApiException ;
+
+ /**
+ * @return
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getUint64()
+ */
+ public abstract BigInteger getUint64() throws NdbApiException ;
+
+ /**
+ * @return
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getUchar()
+ */
+ public abstract short getUchar() throws NdbApiException ;
+
+ /**
+ * @return
+ * @see com.mysql.cluster.ndbapi.NdbRecAttr#getUshort()
+ */
+ public abstract int getUshort() throws NdbApiException ;
public abstract NdbBlob blob_value() throws NdbApiException ;
=== modified file 'java/com/mysql/cluster/ndbj/NdbRecAttrImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbRecAttrImpl.java 2007-05-20 09:20:25 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbRecAttrImpl.java 2007-07-25 17:20:31 +0000
@@ -27,24 +27,24 @@
}
/* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#char_value()
- */
- public char char_value() throws NdbApiException {
- return recAttrRef.char_value();
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#double_value()
- */
- public double double_value() throws NdbApiException {
- return recAttrRef.double_value();
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#float_value()
- */
- public float float_value() throws NdbApiException {
- return recAttrRef.float_value();
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getChar()
+ */
+ public char getChar() throws NdbApiException {
+ return recAttrRef.getChar();
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getDouble()
+ */
+ public double getDouble() throws NdbApiException {
+ return recAttrRef.getDouble();
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getFloat()
+ */
+ public float getFloat() throws NdbApiException {
+ return recAttrRef.getFloat();
}
/* (non-Javadoc)
@@ -55,17 +55,17 @@
}
/* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#int32_value()
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getInt32()
*/
- public int int32_value() throws NdbApiException {
- return recAttrRef.int32_value();
+ public int getInt32() throws NdbApiException {
+ return recAttrRef.getInt32();
}
/* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#int64_value()
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getInt64()
*/
- public long int64_value() throws NdbApiException {
- return recAttrRef.int64_value();
+ public long getInt64() throws NdbApiException {
+ return recAttrRef.getInt64();
}
/* (non-Javadoc)
@@ -76,39 +76,39 @@
}
/* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#short_value()
- */
- public short short_value() throws NdbApiException {
- return recAttrRef.short_value();
- }
-
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_32_value()
- */
- public long u_32_value() throws NdbApiException {
- return recAttrRef.u_32_value();
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_64_value()
- */
- public BigInteger u_64_value() throws NdbApiException {
- return recAttrRef.u_64_value();
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_char_value()
- */
- public short u_char_value() throws NdbApiException {
- return recAttrRef.u_char_value();
- }
-
- /* (non-Javadoc)
- * @see com.mysql.cluster.ndbj.NdbRecAttr#u_short_value()
- */
- public int u_short_value() throws NdbApiException {
- return recAttrRef.u_short_value();
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getShort()
+ */
+ public short getShort() throws NdbApiException {
+ return recAttrRef.getShort();
+ }
+
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUint32()
+ */
+ public long getUint32() throws NdbApiException {
+ return recAttrRef.getUint32();
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUint64()
+ */
+ public BigInteger getUint64() throws NdbApiException {
+ return recAttrRef.getUint64();
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUchar()
+ */
+ public short getUchar() throws NdbApiException {
+ return recAttrRef.getUchar();
+ }
+
+ /* (non-Javadoc)
+ * @see com.mysql.cluster.ndbj.NdbRecAttr#getUshort()
+ */
+ public int getUshort() throws NdbApiException {
+ return recAttrRef.getUshort();
}
public NdbBlob blob_value() throws NdbApiException {
=== modified file 'java/com/mysql/cluster/ndbj/NdbResultSetImpl.java'
--- a/java/com/mysql/cluster/ndbj/NdbResultSetImpl.java 2007-05-20 09:20:25 +0000
+++ b/java/com/mysql/cluster/ndbj/NdbResultSetImpl.java 2007-07-25 17:20:31 +0000
@@ -96,7 +96,7 @@
public int getInt(int columnId) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnId - 1);
testNull(rec);
- return rec.int32_value();
+ return rec.getInt32();
}
/**
@@ -105,7 +105,7 @@
public int getInt(String columnName) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnName);
testNull(rec);
- return rec.int32_value();
+ return rec.getInt32();
}
/**
@@ -114,7 +114,7 @@
public short getShort(int columnId) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnId - 1);
testNull(rec);
- return rec.short_value();
+ return rec.getShort();
}
/**
@@ -123,7 +123,7 @@
public short getShort(String columnName) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnName);
testNull(rec);
- return rec.short_value();
+ return rec.getShort();
}
/**
@@ -132,7 +132,7 @@
public long getLong(int columnId) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnId - 1);
testNull(rec);
- return rec.int64_value();
+ return rec.getInt64();
}
/**
@@ -141,7 +141,7 @@
public long getLong(String columnName) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnName);
testNull(rec);
- return rec.int64_value();
+ return rec.getInt64();
}
@@ -151,7 +151,7 @@
public float getFloat(int columnId) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnId - 1);
testNull(rec);
- return rec.float_value();
+ return rec.getFloat();
}
/**
@@ -160,7 +160,7 @@
public float getFloat(String columnName) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnName);
testNull(rec);
- return rec.float_value();
+ return rec.getFloat();
}
/**
@@ -169,7 +169,7 @@
public double getDouble(int columnId) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnId - 1);
testNull(rec);
- return rec.double_value();
+ return rec.getDouble();
}
/**
@@ -178,7 +178,7 @@
public double getDouble(String columnName) throws NdbApiException {
NdbRecAttr rec = (NdbRecAttr) resultSet.get(columnName);
testNull(rec);
- return rec.double_value();
+ return rec.getDouble();
}
/**
=== modified file 'perl/test.pl'
--- a/perl/test.pl 2007-07-25 14:26:11 +0000
+++ b/perl/test.pl 2007-07-25 17:20:31 +0000
@@ -143,7 +143,7 @@
while ($myScanOperation->nextResult() == 0) {
- my $random_id = $myRecAttr->u_32_value();
+ my $random_id = $myRecAttr->getUint32();
push(@ids,$random_id);
}
@@ -170,10 +170,10 @@
my $myRecAttr = $myOper->getValue("ATTR2");
- if ($myTransaction->execute( $mysql::cluster::ndbapi::Commit ) == -1) {
- print $myTransaction->getNdbError()->getMessage(),"\n";
- }
- $foo=$myRecAttr->u_32_value();
+
+ $myTransaction->execute( $mysql::cluster::ndbapi::Commit );
+
+ $foo=$myRecAttr->getUint32();
$myTransaction->close();
=== modified file 'python/mgmapi.i'
--- a/python/mgmapi.i 2007-04-15 09:56:16 +0000
+++ b/python/mgmapi.i 2007-07-25 17:20:31 +0000
@@ -19,9 +19,9 @@
%module mgmapi
-%include "globals.i"
+%include "mgmglobals.i"
-%include "Mgm.i"
+%include "NdbMgm.i"
extern int ndb_init(void);
=== modified file 'python/ndbapi.i'
--- a/python/ndbapi.i 2007-05-08 02:02:57 +0000
+++ b/python/ndbapi.i 2007-07-25 17:20:31 +0000
@@ -19,7 +19,7 @@
%module(directors="1") ndbapi
-%include "globals.i"
+%include "ndbglobals.i"
@@ -172,6 +172,7 @@
%include "Ndb.i"
+%include "NdbDictionary.i"
%include "NdbTransaction.i"
@@ -212,32 +213,37 @@
%include "NdbOperation.i"
%include "NdbScanOperation.i"
+%include "NdbIndexOperation.i"
+%include "NdbIndexScanOperation.i"
+%include "NdbEventOperation.i"
+
%include "NdbRecAttr.i"
%extend NdbRecAttr {
%pythoncode %{
-def get_value(self):
+def getValue(self):
t=self.getColType()
if t >= NDB_TYPE_TINYINT and t <= NDB_TYPE_BIGINT and (t%2==0.0):
- ret = self.int32_value()
+ ret = self.getInt32()
elif t >= NDB_TYPE_TINYUNSIGNED and t <= NDB_TYPE_BIGUNSIGNED and (t%2==1):
- ret = self.u_32_value()
+ ret = self.getUint32()
elif t == NDB_TYPE_FLOAT:
- ret = self.float_value()
+ ret = self.getFloat()
elif t == NDB_TYPE_DOUBLE or t == NDB_TYPE_OLDDECIMAL:
- ret = self.double_value()
+ ret = self.getDouble()
elif t >= NDB_TYPE_CHAR and t <= NDB_TYPE_VARBINARY:
ret = self.aRef()
elif t == NDB_TYPE_DATE:
- ret = self.u_32_value()
+ ret = self.getUint32()
year = ret/10000 % 10000
month = ret/100 % 100
day = ret % 100
ret = "%s-%s-%s" % (year,month,day)
else:
+ # TODO add newer datatypes here
raise NdbApiException, "unknown type"
return ret
@@ -246,7 +252,8 @@
};
%include "NdbError.i"
-%include "NdbDictionary.i"
+%include "NdbBlob.i"
+%include "NdbScanFilter.i"
%pythoncode %{
=== modified file 'python/test.py'
--- a/python/test.py 2007-05-07 07:59:37 +0000
+++ b/python/test.py 2007-07-25 17:20:31 +0000
@@ -48,7 +48,7 @@
print e
sys.exit(-1)
-if (connection.wait_until_ready(30,30)):
+if (connection.waitUntilReady(30,30)):
print "Cluster was not ready within 30 secs."
sys.exit(-1);
@@ -81,7 +81,7 @@
myOperation.insertTuple()
auto_id = myNdb.getAutoIncrementValue("mytablename",BATCH_SIZE)
- myOperation.equal("ATTR1",auto_id);
+ myOperation.equalUint64("ATTR1",auto_id);
myOperation.setValue("ATTR2", i);
ret = myTransaction.execute( ndbapi.Commit )
@@ -121,7 +121,7 @@
if (myScanOperation.nextResult(True) != 0) :
break
- random_id = myRecAttr.u_32_value()
+ random_id = myRecAttr.getValue()
ids.append(random_id)
@@ -143,14 +143,14 @@
myOper = myTrans.getNdbOperation("mytablename")
myOper.readTuple(ndbapi.NdbOperation.LM_Read)
- myOper.equal("ATTR1",id_num)
+ myOper.equalUint64("ATTR1",id_num)
myRecAttr= myOper.getValue("ATTR2")
if myTrans.execute( ndbapi.Commit ) == -1:
print myTrans.getNdbError().getMessage()
- foo=myRecAttr.get_value()
+ foo=myRecAttr.getValue()
myTrans.close()
=== modified file 'python/test2.py'
--- a/python/test2.py 2007-04-27 23:03:46 +0000
+++ b/python/test2.py 2007-07-25 17:20:31 +0000
@@ -15,7 +15,7 @@
sys.exit(-1)
-if (connection.wait_until_ready(30,30)):
+if (connection.waitUntilReady(30,30)):
print "Cluster was not ready within 30 secs."
sys.exit(-1);
@@ -43,8 +43,7 @@
if myTrans.execute( ndb.Commit ) == -1:
print myTrans.getNdbError().getMessage()
-#foo=myRecAttr.u_32_value()
-foo=myRecAttr.get_value()
+foo=myRecAttr.getValue()
print foo, myRecAttr.getColType()
myNdb.closeTransaction(myTrans)
=== modified file 'python/testasynch.py'
--- a/python/testasynch.py 2007-05-07 07:59:37 +0000
+++ b/python/testasynch.py 2007-07-25 17:20:31 +0000
@@ -13,8 +13,8 @@
self.callback(*args,**kw)
def callback(self, ret, myTrans):
- #print "value = ", self.recAttr.get_value()
- x=self.recAttr.get_value()
+ #print "value = ", self.recAttr.getValue()
+ x=self.recAttr.getValue()
import MySQLdb
@@ -133,7 +133,7 @@
if (myScanOperation.nextResult(True) != 0) :
break
- random_id = myRecAttr.u_32_value()
+ random_id = myRecAttr.getValue()
ids.append(random_id)
=== modified file 'ruby/mgmapi.i'
--- a/ruby/mgmapi.i 2007-05-03 09:00:26 +0000
+++ b/ruby/mgmapi.i 2007-07-25 17:20:31 +0000
@@ -19,7 +19,7 @@
%module "mgmapi"
-%include "globals.i"
+%include "mgmglobals.i"
%typemap(in) int filter[] {
// Input will be array of tuples
@@ -40,4 +40,4 @@
//%apply ndb_logevent *OUTPUT { ndb_logevent *dst };
-%include "Mgm.i"
+%include "NdbMgm.i"
=== modified file 'ruby/ndbapi.i'
--- a/ruby/ndbapi.i 2007-05-29 15:45:11 +0000
+++ b/ruby/ndbapi.i 2007-07-25 17:20:31 +0000
@@ -21,7 +21,7 @@
custom code is really clean anyway. */
%module ndbapi
-%include "globals.i"
+%include "ndbglobals.i"
%typemap(in) (const char* anInputString, size_t len) {
@@ -144,6 +144,7 @@
%include "NdbFactory.i"
%include "NdbClusterConnection.i"
%include "Ndb.i"
+%include "NdbDictionary.i"
%include "NdbTransaction.i"
%extend NdbTransaction {
@@ -157,8 +158,14 @@
%include "NdbOperation.i"
%include "NdbScanOperation.i"
+%include "NdbIndexOperation.i"
+%include "NdbIndexScanOperation.i"
+%include "NdbEventOperation.i"
+
%include "NdbRecAttr.i"
%include "NdbError.i"
+%include "NdbBlob.i"
+%include "NdbScanFilter.i"
=== modified file 'ruby/testasync.rb'
--- a/ruby/testasync.rb 2007-05-07 07:57:05 +0000
+++ b/ruby/testasync.rb 2007-07-25 17:20:31 +0000
@@ -5,7 +5,7 @@
@myRecAttr=myRecAttr
end
def call(trans)
- puts @myRecAttr.int_32_value
+ puts @myRecAttr.get_int32
end
end
=== modified file 'ruby/testreaddt.rb'
--- a/ruby/testreaddt.rb 2007-05-21 23:00:16 +0000
+++ b/ruby/testreaddt.rb 2007-07-25 17:20:31 +0000
@@ -37,6 +37,6 @@
myTransaction.execute(Ndbapi::Commit)
-puts ra.u_32_value()
+puts ra.get_uint32()
myTransaction.close
=== modified file 'ruby/testselectcount.rb'
--- a/ruby/testselectcount.rb 2007-05-29 15:45:11 +0000
+++ b/ruby/testselectcount.rb 2007-07-25 17:20:31 +0000
@@ -40,6 +40,6 @@
myTransaction.execute(Ndbapi::Commit)
-puts ra.u_32_value()
+puts ra.get_uint32()
myTransaction.close
=== modified file 'swig/NdbRecAttr.i'
--- a/swig/NdbRecAttr.i 2007-05-20 09:20:25 +0000
+++ b/swig/NdbRecAttr.i 2007-07-25 17:20:31 +0000
@@ -27,6 +27,30 @@
int isNULL();
+#if !defined(SWIG_RUBY_AUTORENAME)
+ %rename(getInt64) int64_value();
+ %rename(getInt32) int32_value();
+ %rename(getShort) short_value();
+ %rename(getChar) char_value();
+ %rename(getUint64) u_64_value() const;
+ %rename(getUint32) u_32_value();
+ %rename(getUshort) u_short_value() const;
+ %rename(getUchar) u_char_value() const;
+ %rename(getFloat) float_value() const;
+ %rename(getDouble) double_value() const;
+#else
+ %rename(get_int64) int64_value();
+ %rename(get_int32) int32_value();
+ %rename(get_short) short_value();
+ %rename(get_char) char_value();
+ %rename(get_uint64) u_64_value() const;
+ %rename(get_uint32) u_32_value();
+ %rename(get_ushort) u_short_value() const;
+ %rename(get_uchar) u_char_value() const;
+ %rename(get_float) float_value() const;
+ %rename(get_double) double_value() const;
+#endif
+
Int64 int64_value();
Int32 int32_value();
short short_value();
| Thread |
|---|
| • Rev 127: Renamed RecAttr methods to not be ugly. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge | Monty Taylor | 25 Jul |