At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
------------------------------------------------------------
revno: 167
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Fri 2007-09-14 03:08:14 -0700
message:
Fixed all the ndbj example programs.
modified:
java/com/mysql/cluster/ndbj/examples/CRUDandScan.java
crudandscan.java-20070517181935-98huwjarzuh25b30-32
java/com/mysql/cluster/ndbj/examples/DeleteUsingPrimaryKey.java
deleteusingprimaryke-20070517181935-98huwjarzuh25b30-33
java/com/mysql/cluster/ndbj/examples/HelloWorldInsert.java
helloworldinsert.jav-20070517181935-98huwjarzuh25b30-35
java/com/mysql/cluster/ndbj/examples/InsertUsingPrimaryKey.java
insertusingprimaryke-20070517181935-98huwjarzuh25b30-36
java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java
joinusingscanandinde-20070517181935-98huwjarzuh25b30-37
java/com/mysql/cluster/ndbj/examples/PrimaryKeyBatchOps.java
primarykeybatchops.j-20070517181935-98huwjarzuh25b30-38
java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java
primarykeyopblob.jav-20070517181935-98huwjarzuh25b30-39
java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java
readrowsusingtablesc-20070517181935-98huwjarzuh25b30-40
java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java
readusingorderedinde-20070517181935-98huwjarzuh25b30-41
java/com/mysql/cluster/ndbj/examples/ReadUsingPrimaryKey.java
readusingprimarykey.-20070517181935-98huwjarzuh25b30-42
java/com/mysql/cluster/ndbj/examples/RetryTransaction.java
retrytransaction.jav-20070517181935-98huwjarzuh25b30-43
java/com/mysql/cluster/ndbj/examples/TestAsync.java
testasync.java-20070703002120-jsnz1ul38pp1h3w3-1
java/com/mysql/cluster/ndbj/examples/TestBaseCallback.java
testbasecallback.jav-20070703002120-jsnz1ul38pp1h3w3-2
java/com/mysql/cluster/ndbj/examples/UpdateUsingPrimaryKey.java
updateusingprimaryke-20070517181935-98huwjarzuh25b30-44
=== modified file 'java/com/mysql/cluster/ndbj/examples/CRUDandScan.java'
--- a/java/com/mysql/cluster/ndbj/examples/CRUDandScan.java 2007-09-14 07:54:14 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/CRUDandScan.java 2007-09-14 10:08:14 +0000
@@ -13,6 +13,9 @@
import com.mysql.cluster.ndbj.NdbScanOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
+
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -203,7 +206,7 @@
* be executed in the cluster. Here we have a batch consisting of
(NUM_OF_ROWS_TO_INSERT*2) operations.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("We have written a lot of row containing (0.." + NUM_ROWS_TO_INSERT
+ ", Some timestamp, 'Jim', 'Dowling') to test.ndbj_multi_pk");
}
@@ -275,7 +278,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is a primary key operation, so we only expect a single row to be returned (or
not returned).
@@ -362,7 +365,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit,AbortOption.AbortOnError, true);
System.out.println("We have updated a row to the values (1, 'Johan', 'Andersson') to
test.ndbj_multi_pk");
}
@@ -417,7 +420,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("Deleted a row");
}
@@ -489,7 +492,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be returned.
@@ -570,7 +573,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be returned.
@@ -650,7 +653,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be returned.
=== modified file 'java/com/mysql/cluster/ndbj/examples/DeleteUsingPrimaryKey.java'
--- a/java/com/mysql/cluster/ndbj/examples/DeleteUsingPrimaryKey.java 2007-09-14 07:54:14
+0000
+++ b/java/com/mysql/cluster/ndbj/examples/DeleteUsingPrimaryKey.java 2007-09-14 10:08:14
+0000
@@ -8,6 +8,8 @@
import com.mysql.cluster.ndbj.NdbOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
* This program assumes you have just run the InsertAndReadUsingPrimaryKey program, i.e.,
that
* you have created a table called 'ndbj_test' in the 'test' database, and there is a row
with
@@ -155,7 +157,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("Deleted a row");
}
=== modified file 'java/com/mysql/cluster/ndbj/examples/HelloWorldInsert.java'
--- a/java/com/mysql/cluster/ndbj/examples/HelloWorldInsert.java 2007-09-14 07:54:14 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/HelloWorldInsert.java 2007-09-14 10:08:14 +0000
@@ -9,6 +9,8 @@
import java.sql.*;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
* You need to create a the following table in the "test" database:
* <br><code>
@@ -132,7 +134,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("Done");
}
/**
=== modified file 'java/com/mysql/cluster/ndbj/examples/InsertUsingPrimaryKey.java'
--- a/java/com/mysql/cluster/ndbj/examples/InsertUsingPrimaryKey.java 2007-09-14 07:54:14
+0000
+++ b/java/com/mysql/cluster/ndbj/examples/InsertUsingPrimaryKey.java 2007-09-14 10:08:14
+0000
@@ -8,6 +8,8 @@
import com.mysql.cluster.ndbj.NdbOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -165,7 +167,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("We have written a row containing (1, 'Jim', 'Dowling') to
test.ndbj_test");
}
=== modified file 'java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java'
--- a/java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java 2007-09-14
07:54:14 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/JoinUsingScanAndIndexScan.java 2007-09-14
10:08:14 +0000
@@ -13,6 +13,8 @@
import com.mysql.cluster.ndbj.NdbScanOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -175,7 +177,7 @@
* be executed in the cluster. Here we have a batch consisting of
(NUM_OF_ROWS_TO_INSERT*2) operations.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
}
catch (NdbApiException e) {
@@ -221,7 +223,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.NoCommit,
NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.NoCommit, AbortOption.AbortOnError, true);
ArrayList<NdbResultSet> rs_b_list = new ArrayList<NdbResultSet>();
@@ -267,7 +269,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This batch of index scan operations returned an ArrayList of NdbResultSet objects.
=== modified file 'java/com/mysql/cluster/ndbj/examples/PrimaryKeyBatchOps.java'
--- a/java/com/mysql/cluster/ndbj/examples/PrimaryKeyBatchOps.java 2007-09-14 07:54:14
+0000
+++ b/java/com/mysql/cluster/ndbj/examples/PrimaryKeyBatchOps.java 2007-09-14 10:08:14
+0000
@@ -12,6 +12,8 @@
import com.mysql.cluster.ndbj.NdbResultSet;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -190,7 +192,7 @@
* be executed in the cluster. Here we have a batch consisting of
(NUM_OF_ROWS_TO_INSERT*2) operations.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("We have written a lot of row containing (0.." + numOfRowsToInsert
+ ", Some timestamp, 'Jim', 'Dowling') to test.ndbj_multi_pk");
}
@@ -268,7 +270,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* Loop through all the NdbResultSet objects in the ArrayLisr
=== modified file 'java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java'
--- a/java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java 2007-09-14 07:54:14 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/PrimaryKeyOpBlob.java 2007-09-14 10:08:14 +0000
@@ -10,6 +10,8 @@
import com.mysql.cluster.ndbj.NdbResultSet;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -165,7 +167,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("Wrote a row containing (1, 'Rob...') to test.ndbj_blob");
}
@@ -227,8 +229,8 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit,
- NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.Commit,
+ AbortOption.AbortOnError, true);
/**
* This is a primary key operation, so we only expect a single row to be returned (or
not returned).
@@ -306,8 +308,8 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.NoCommit,
- NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.NoCommit,
+ AbortOption.AbortOnError, true);
/**
* This is a primary key operation, so we only expect a single row to be returned (or
not returned).
@@ -330,7 +332,7 @@
System.out.println("Something went wrong. Could not find the row using the supplied
equals() value. Try using the mysql client \"select * from test_blob where id='X';\"");
}
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
}
catch (NdbApiException e) {
=== modified file 'java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java'
--- a/java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java 2007-09-14 07:54:14
+0000
+++ b/java/com/mysql/cluster/ndbj/examples/ReadRowsUsingTableScan.java 2007-09-14 10:08:14
+0000
@@ -10,6 +10,8 @@
import com.mysql.cluster.ndbj.NdbScanOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -163,7 +165,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be returned.
=== modified file 'java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java'
--- a/java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java 2007-09-14
07:54:14 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/ReadUsingOrderedIndexOnPK.java 2007-09-14
10:08:14 +0000
@@ -11,6 +11,8 @@
import com.mysql.cluster.ndbj.NdbScanOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -166,7 +168,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be returned.
@@ -239,7 +241,7 @@
* We also pass the 'NoCommit' parameter to indicate that the transaction
should not be committed to the database,
* until the rows are updated.
*/
- trans.execute(NdbTransaction.ExecType.NoCommit,
NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.NoCommit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be
returned.
@@ -258,7 +260,7 @@
/**
* Commit the transaction after (1) the rows have been read and (2) the rows
read have been updated.
*/
- trans.execute(NdbTransaction.ExecType.Commit,
NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
}
catch (NdbApiException e) {
@@ -318,7 +320,7 @@
* We also pass the 'NoCommit' parameter to indicate that the transaction
should not be committed to the database,
* until the rows are updated.
*/
- trans.execute(NdbTransaction.ExecType.NoCommit,
NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.NoCommit, AbortOption.AbortOnError, true);
/**
* This is an index scan operation, so we can expect many rows to be
returned.
@@ -333,7 +335,7 @@
/**
* Commit the transaction after (1) the rows have been read and (2) the rows
read have been updated.
*/
- trans.execute(NdbTransaction.ExecType.Commit,
NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
}
catch (NdbApiException e) {
=== modified file 'java/com/mysql/cluster/ndbj/examples/ReadUsingPrimaryKey.java'
--- a/java/com/mysql/cluster/ndbj/examples/ReadUsingPrimaryKey.java 2007-09-14 07:54:14
+0000
+++ b/java/com/mysql/cluster/ndbj/examples/ReadUsingPrimaryKey.java 2007-09-14 10:08:14
+0000
@@ -9,6 +9,8 @@
import com.mysql.cluster.ndbj.NdbResultSet;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -162,7 +164,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
/**
* This is a primary key operation, so we only expect a single row to be returned (or
not returned).
=== modified file 'java/com/mysql/cluster/ndbj/examples/RetryTransaction.java'
--- a/java/com/mysql/cluster/ndbj/examples/RetryTransaction.java 2007-09-14 07:54:14 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/RetryTransaction.java 2007-09-14 10:08:14 +0000
@@ -9,6 +9,8 @@
import com.mysql.cluster.ndbj.NdbOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
/**
*
* Create a file called 'ndbj.props' in your home directory
@@ -209,7 +211,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit,
NdbTransaction.AbortOption.AbortOnError, true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("A row was written containing (1, 'Jim', 'Dowling') to
test.ndbj_test");
notFinished = false;
=== modified file 'java/com/mysql/cluster/ndbj/examples/TestAsync.java'
--- a/java/com/mysql/cluster/ndbj/examples/TestAsync.java 2007-09-14 01:52:17 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/TestAsync.java 2007-09-14 10:08:14 +0000
@@ -5,7 +5,7 @@
import java.util.Date;
import java.util.ArrayList;
import com.mysql.cluster.ndbj.*;
-import com.mysql.cluster.errors.*;
+
public class TestAsync {
@@ -134,7 +134,7 @@
}
- myTransaction.execute( NdbTransaction.ExecType.Commit,
NdbTransaction.AbortOption.AbortOnError, true );
+ myTransaction.execute( ExecType.Commit, AbortOption.AbortOnError, true );
@@ -170,7 +170,7 @@
NdbResultSet rs = myScanOperation.resultData();
- myTransaction.execute(NdbTransaction.ExecType.NoCommit);
+ myTransaction.execute(ExecType.NoCommit);
ArrayList<Integer> ids = new ArrayList<Integer>();
@@ -211,7 +211,7 @@
rs = myOper.resultData();
- myTrans.execute(NdbTransaction.ExecType.Commit);
+ myTrans.execute(ExecType.Commit);
rs.getInt("ATTR2");
@@ -248,7 +248,7 @@
rs = myOper.resultData();
TestBaseCallback cb = new TestBaseCallback(myNdb,rs);
- myTrans.executeAsynchPrepare(NdbTransaction.ExecType.Commit, cb );
+ myTrans.executeAsynchPrepare(ExecType.Commit, cb );
cbs.add(cb);
// foo=myRecAttr.int32_value();
=== modified file 'java/com/mysql/cluster/ndbj/examples/TestBaseCallback.java'
--- a/java/com/mysql/cluster/ndbj/examples/TestBaseCallback.java 2007-07-03 18:04:19 +0000
+++ b/java/com/mysql/cluster/ndbj/examples/TestBaseCallback.java 2007-09-14 10:08:14 +0000
@@ -1,7 +1,9 @@
package com.mysql.cluster.ndbj.examples;
import com.mysql.cluster.ndbj.*;
-import com.mysql.cluster.errors.*;
+
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
class TestBaseCallback extends BaseCallback {
=== modified file 'java/com/mysql/cluster/ndbj/examples/UpdateUsingPrimaryKey.java'
--- a/java/com/mysql/cluster/ndbj/examples/UpdateUsingPrimaryKey.java 2007-09-14 07:54:14
+0000
+++ b/java/com/mysql/cluster/ndbj/examples/UpdateUsingPrimaryKey.java 2007-09-14 10:08:14
+0000
@@ -8,6 +8,9 @@
import com.mysql.cluster.ndbj.NdbOperation;
import com.mysql.cluster.ndbj.NdbTransaction;
+import com.mysql.cluster.ndbj.AbortOption;
+import com.mysql.cluster.ndbj.ExecType;
+
/**
* This program assumes you have just run the InsertAndReadUsingPrimaryKey program, i.e.,
that
* you have created a table called 'ndbj_test' in the 'test' database, and there is a row
with
@@ -167,7 +170,7 @@
* be executed in the cluster. Here we have only a single operation.
* We also pass the 'commit' parameter to indicate that the transaction should be
committed to the database.
*/
- trans.execute(NdbTransaction.ExecType.Commit, NdbTransaction.AbortOption.AbortOnError,
true);
+ trans.execute(ExecType.Commit, AbortOption.AbortOnError, true);
System.out.println("We have updated a row to the values (1, 'Johan', 'Andersson') to
test.ndbj_test");
}
| Thread |
|---|
| • Rev 167: Fixed all the ndbj example programs. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge | Monty Taylor | 14 Sep |