Skip to content

Commit

Permalink
Fix typo in table name
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Hafner committed Dec 6, 2024
1 parent 58da4e2 commit 3183db5
Showing 1 changed file with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void testCreateTable() throws SQLException {
statement.executeUpdate( "CREATE TABLE identifiers (a INTEGER NOT NULL, b INTEGER, PRIMARY KEY (a))" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -70,7 +70,7 @@ public void testInsertUnparameterizedWithColumnNames() throws SQLException {

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -91,7 +91,7 @@ public void testInsertPreparedWithColumnNames() throws SQLException {
preparedStatement.executeUpdate();
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -110,7 +110,7 @@ public void testInsertMultipleUnparameterizedWithColumnNames() throws SQLExcepti

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -134,7 +134,7 @@ public void testInsertMultiplePreparedWithColumnNames() throws SQLException {
preparedStatement.executeBatch();
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -158,8 +158,8 @@ public void testInsertFromTableWithDifferentColumnNames() throws SQLException {
//TODO TH: check that new identifiers had been assigned instead of copying from the first table
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE identifiers2" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers2" );
connection.commit();
}
}
Expand All @@ -181,8 +181,8 @@ public void testInsertFromTableWithoutTargetColumnNames() throws SQLException {
//TODO TH: check that new identifiers had been assigned instead of copying from the first table
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE identifiers2" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers2" );
connection.commit();
}
}
Expand All @@ -205,8 +205,8 @@ public void testInsertFromTableWithoutColumnNames() throws SQLException {
//TODO TH: check that new identifiers had been assigned instead of copying from the first table
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE identifiers2" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers2" );
connection.commit();
}
}
Expand All @@ -224,7 +224,7 @@ public void testInsertUnparameterizedDefaultExplicit() throws SQLException {
statement.executeUpdate( "INSERT INTO identifiers1 (a, b) VALUES (1, DEFAULT)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -242,7 +242,7 @@ public void testInsertUnparameterizedDefaultOmitted() throws SQLException {
statement.executeUpdate( "INSERT INTO identifiers1 (a) VALUES (1)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -260,7 +260,7 @@ public void testInsertUnparameterizedDefaultExplicitNoColumnNames() throws SQLEx
statement.executeUpdate( "INSERT INTO identifiers1 VALUES (1, DEFAULT)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -283,7 +283,7 @@ public void testInsertParameterizedDefaultExplicit() throws SQLException {
}
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -306,7 +306,7 @@ public void testInsertParameterizedDefaultOmitted() throws SQLException {
}
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -328,7 +328,7 @@ public void testInsertParameterizedDefaultExplicitNoColumnNames() throws SQLExce
}
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -346,7 +346,7 @@ public void testInsertMultipleUnparameterizedDefaultExplicit() throws SQLExcepti
statement.executeUpdate( "INSERT INTO identifiers1 (a, b) VALUES (1, DEFAULT), (2, 3), (3, DEFAULT)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -364,7 +364,7 @@ public void testInsertMultipleUnparameterizedDefaultExplicitNoColumnNames() thro
statement.executeUpdate( "INSERT INTO identifiers1 VALUES (1, DEFAULT), (2, 3), (3, DEFAULT)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -382,7 +382,7 @@ public void testInsertMultipleUnparameterizedDefaultOmitted() throws SQLExceptio
statement.executeUpdate( "INSERT INTO identifiers1 (a) VALUES (1), (2), (3)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -409,7 +409,7 @@ public void testInsertMultipleParameterizedDefaultExplicit() throws SQLException

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -436,7 +436,7 @@ public void testInsertMultipleParameterizedDefaultExplicitNoColumnNames() throws

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -462,7 +462,7 @@ public void testInsertMultipleParameterizedDefaultOmitted() throws SQLException

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers1" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers1" );
connection.commit();
}
}
Expand All @@ -480,7 +480,7 @@ public void testInsertUnparameterizedNoColumnNames() throws SQLException {
statement.executeUpdate( "INSERT INTO identifiers VALUES (1, 2)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -495,15 +495,15 @@ public void testInsertPreparedNoColumnNames() throws SQLException {
try ( Statement statement = connection.createStatement() ) {
try {
statement.executeUpdate( "CREATE TABLE identifiers (a INTEGER NOT NULL, b INTEGER, PRIMARY KEY (a))" );
String insertSql = "INSERT INTO table_name VALUES (?, ?)";
String insertSql = "INSERT INTO identifiers VALUES (?, ?)";
try ( PreparedStatement preparedStatement = connection.prepareStatement( insertSql ) ) {
preparedStatement.setInt( 1, 1 );
preparedStatement.setInt( 2, 2 );
preparedStatement.executeUpdate();
}
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE table_name" );
statement.executeUpdate( "DROP TABLE identifiers" );
connection.commit();
}
}
Expand Down Expand Up @@ -563,7 +563,7 @@ public void testInsertUnparameterizedIdentifierManipulationInsert() throws SQLEx
statement.executeUpdate( "INSERT INTO identifiers VALUES (1, 2, 3)" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -583,7 +583,7 @@ public void testUpdateUnparameterizedIdentifierManipulation() throws SQLExceptio
statement.executeUpdate( "UPDATE identifiers SET _eid = 1 WHERE a = 1 AND b = 2" );
connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -604,7 +604,7 @@ public void testDropIdentifierColumnUnparameterized() throws SQLException {

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -625,7 +625,7 @@ public void testAddIdentifierColumnUnparameterized() throws SQLException {

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -646,7 +646,7 @@ public void testDropMulitpleColumnUnparameterized() throws SQLException {

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -666,7 +666,7 @@ public void testAddMulitpleColumnUnparameterized() throws SQLException {

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -686,7 +686,7 @@ public void testRenameIdentifierColumnUnparameterized() throws SQLException {

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand All @@ -706,7 +706,7 @@ public void testChangeDataTypeOfIdentifierColumnUnparameterized() throws SQLExce

connection.commit();
} finally {
statement.executeUpdate( "DROP TABLE identifiers" );
statement.executeUpdate( "DROP TABLE IF EXISTS identifiers" );
connection.commit();
}
}
Expand Down

0 comments on commit 3183db5

Please sign in to comment.