From: Date: October 3 2007 12:57am Subject: Rev 170: Removed symlink for windows checkouts. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge List-Archive: http://lists.mysql.com/commits/34793 Message-Id: At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge ------------------------------------------------------------ revno: 170 revision-id: mtaylor@stripped parent: mtaylor@stripped committer: Monty Taylor branch nick: ndbjmerge timestamp: Tue 2007-10-02 15:56:43 -0700 message: Removed symlink for windows checkouts. Work on making NdbBlob make sense. It doesn't yet - don't get too excited. removed: python/swig@ swig-20070403034816-z3uapdywjzssdkh2-1 modified: java/com/mysql/cluster/ndbj/BlobUndefinedException.java blobundefinedexcepti-20070428054022-qvbhak1i97y86t1c-1 java/com/mysql/cluster/ndbj/NdbBlob.java ndbblob.java-20070517181935-98huwjarzuh25b30-7 java/com/mysql/cluster/ndbj/NdbOperationResults.java ndboperationresults.-20070930023920-gzlkrx1c10i1d6bl-1 java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java primarykeyopblob.jav-20070517181935-98huwjarzuh25b30-39 java/ndbj.i ndbj.i-20070913223244-5938mztpztyn9sry-1 === removed symlink 'python/swig' === target was '../swig' === modified file 'java/com/mysql/cluster/ndbj/BlobUndefinedException.java' --- a/java/com/mysql/cluster/ndbj/BlobUndefinedException.java 2007-10-01 19:55:09 +0000 +++ b/java/com/mysql/cluster/ndbj/BlobUndefinedException.java 2007-10-02 22:56:43 +0000 @@ -7,7 +7,7 @@ */ public class BlobUndefinedException extends NdbApiException { - static final long serialVersionUID = 1L; + protected static final long serialVersionUID = 1L; public BlobUndefinedException(NdbError error) { super(error); === modified file 'java/com/mysql/cluster/ndbj/NdbBlob.java' --- a/java/com/mysql/cluster/ndbj/NdbBlob.java 2007-09-30 02:06:41 +0000 +++ b/java/com/mysql/cluster/ndbj/NdbBlob.java 2007-10-02 22:56:43 +0000 @@ -10,7 +10,8 @@ * (a) "header" and "inline bytes" stored in the blob attribute * (b) "blob parts" stored in a separate table NDB$BLOB__ * - *

NdbBlobRef is a blob handle. To access blob data, the handle must be created using NdbOperationRef::getBlobHandle in operation prepare phase. + *

NdbBlob is a blob handle. To access blob data, the handle must + * be created using NdbOperation.getBlobHandle() in operation prepare phase. * The handle has following states: *

    *
  • prepared: before the operation is executed
  • @@ -18,7 +19,7 @@ *
  • closed: after transaction commit
  • *
  • invalid: after rollback or transaction close
  • *
- * In the prepare phase, NdbBlobRef methods getValue and setValue are used + * In the prepare phase, NdbBlob methods getValue and setValue are used * to prepare a read or write of a blob value of known size. * *

Operation types: @@ -30,14 +31,13 @@ * scan with exclusive lock can also update existing value * scan "lock takeover" update op must do its own getBlobHandle * - * @see com.mysql.cluster.ndbj.NdbBase * @see com.mysql.cluster.ndbj.NdbOperation * @see com.mysql.cluster.ndbj.NdbIndexOperation * @see com.mysql.cluster.ndbj.NdbScanOperation * @see com.mysql.cluster.ndbj.NdbIndexScanOperation * @see com.mysql.cluster.ndbj.NdbTransaction * @see com.mysql.cluster.ndbj.Ndb - * @see com.mysql.cluster.ndbj.NdbClusterConnectionImpl + * @see com.mysql.cluster.ndbj.NdbClusterConnection */ public interface NdbBlob { @@ -52,8 +52,9 @@ * you intend to use it elsewhere. * @throws NdbApiException if * + */ public abstract byte[] getData() throws NdbApiException; - */ + /** * Set blob value to NULL. */ @@ -69,9 +70,9 @@ *

  • Data can only be fetched from the NdbBlobRef object using the getData() method - * you cannot use the readData() method.
  • * @throws NdbApiException - + */ public abstract void getValue(long len) throws NdbApiException; -*/ + /** * Used to set the value for a Blob. * @param data === modified file 'java/com/mysql/cluster/ndbj/NdbOperationResults.java' --- a/java/com/mysql/cluster/ndbj/NdbOperationResults.java 2007-09-30 02:39:45 +0000 +++ b/java/com/mysql/cluster/ndbj/NdbOperationResults.java 2007-10-02 22:56:43 +0000 @@ -41,4 +41,8 @@ */ public abstract NdbResultSet resultData(); + public void getBlob(long columnId) throws NdbApiException; + + public void getBlob(String columnName) throws NdbApiException; + } \ No newline at end of file === modified file 'java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java' --- a/java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java 2007-10-01 06:12:42 +0000 +++ b/java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java 2007-10-02 22:56:43 +0000 @@ -159,7 +159,7 @@ * The column 'firstName' is of type 'VARCHAR' (a string), so we call the setString() method to set its value. */ - NdbBlob bh = op.getNdbBlobHandle("data"); + NdbBlob bh = op.getBlobHandle("data"); bh.setValue("Rob..".getBytes()); /** === modified file 'java/ndbj.i' --- a/java/ndbj.i 2007-10-01 06:12:42 +0000 +++ b/java/ndbj.i 2007-10-02 22:56:43 +0000 @@ -460,6 +460,29 @@ public int equal(String columnName, Timestamp val) throws NdbApiException { return equalTimestamp(columnName,val); } + + /** + * getNdbBlobHandle is deprecated. Please use getBlobHandle instead + * @param columnName + * @return + * @throws NdbApiException + */ + @Deprecated + public NdbBlob getNdbBlobHandle(String columnName) throws NdbApiException { + return getBlobHandle(columnName); + } + + /** + * getNdbBlobHandle is deprecated. Please use getBlobHandle instead + * @param columnName + * @return + * @throws NdbApiException + */ + @Deprecated + public NdbBlob getNdbBlobHandle(long columnId) throws NdbApiException { + return getBlobHandle(columnId); + } + %} %typemap(javaimports) NdbOperation %{ @@ -480,6 +503,7 @@ return NdbOperation.LockMode.swigToEnum(ndbjJNI.NdbOperationImpl_getLockMode(swigCPtr, this)); } + %include "NdbOperation.i" %typemap(jstype) NdbScanOperation::ScanFlag "NdbScanOperation.ScanFlag" @@ -545,6 +569,7 @@ %include "NdbRecAttr.i" + %typemap(javainterfaces) NdbBlob "NdbBlob"; %typemap(jstype) NdbBlob::State "NdbBlob.State"