Skip to content

Commit

Permalink
read db.supports.sequence from passed setup properties and remove ext…
Browse files Browse the repository at this point in the history
…ra create of SEQGENERATOR

Signed-off-by: Scott Marlow <[email protected]>
  • Loading branch information
scottmarlow committed Dec 10, 2024
1 parent 4c27b3f commit 22fd88d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ public class Client extends PMClientBase {
public Client() {
}

protected void createSequenceGenerator() {
try {
getEntityTransaction().begin();
getEntityManager().createNativeQuery("CREATE SEQUENCE SEQGENERATOR START WITH 10").executeUpdate();
getEntityTransaction().commit();
} catch (Exception e) {
logErr( "Exception encountered while creating seq:", e);
}

}


public void cleanup() throws Exception {
try {
logTrace( "Cleanup data");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ public void setup(String[] args, Properties p) throws Exception {
try {

super.setup(args,p);
String s = System.getProperty("db.supports.sequence");
String s = p.getProperty("db.supports.sequence");
if (s != null) {
supports_sequence = Boolean.parseBoolean(s);
logMsg( "db.supports.sequence:" + supports_sequence);
if (supports_sequence) {
createSequenceGenerator();
removeTestData();
createTestData();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ public void setup(String[] args, Properties p) throws Exception {
try {

super.setup(args,p);
String s = System.getProperty("db.supports.sequence");
String s = p.getProperty("db.supports.sequence");
if (s != null) {
supports_sequence = Boolean.parseBoolean(s);
logMsg( "db.supports.sequence:" + supports_sequence);
if (supports_sequence) {
createSequenceGenerator();
removeTestData();
createDataTypes2Data();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ public void setup(String[] args, Properties p) throws Exception {
try {

super.setup(args,p);
String s = System.getProperty("db.supports.sequence");
String s = p.getProperty("db.supports.sequence");
if (s != null) {
supports_sequence = Boolean.parseBoolean(s);
logMsg( "db.supports.sequence:" + supports_sequence);
if (supports_sequence) {
createSequenceGenerator();
removeTestData();
createDataTypes3Data();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ public void setup(String[] args, Properties p) throws Exception {
try {

super.setup(args,p);
String s = System.getProperty("db.supports.sequence");
String s = p.getProperty("db.supports.sequence");
if (s != null) {
supports_sequence = Boolean.parseBoolean(s);
logMsg( "db.supports.sequence:" + supports_sequence);
if (supports_sequence) {
createSequenceGenerator();
removeTestData();
createDataTypes4Data();
}
Expand Down

0 comments on commit 22fd88d

Please sign in to comment.