Skip to content

Commit

Permalink
Inline method addPrimaryKeyToCopyTable in TestPostgreSqlJdbcConnectio…
Browse files Browse the repository at this point in the history
…nAccesses
  • Loading branch information
chenjian2664 committed Dec 10, 2024
1 parent ef58786 commit c82bddb
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,12 @@ private void testJdbcMergeConnectionCreations()
{
assertJdbcConnections("CREATE TABLE copy_of_customer AS SELECT * FROM customer", 15, Optional.empty());

addPrimaryKeyToCopyTable();
postgreSqlServer.execute("ALTER TABLE copy_of_customer ADD CONSTRAINT t_copy_of_customer PRIMARY KEY (custkey)");
assertJdbcConnections("DELETE FROM copy_of_customer WHERE abs(custkey) = 1", 24, Optional.empty());
assertJdbcConnections("UPDATE copy_of_customer SET name = 'POLAND' WHERE abs(custkey) = 1", 32, Optional.empty());
assertJdbcConnections("MERGE INTO copy_of_customer c USING customer r ON r.custkey = c.custkey WHEN MATCHED THEN DELETE", 28, Optional.empty());
}

private void addPrimaryKeyToCopyTable()
{
postgreSqlServer.execute("ALTER TABLE copy_of_customer ADD CONSTRAINT t_copy_of_customer PRIMARY KEY (custkey)");
}

private static final class TestingPostgreSqlModule
extends AbstractConfigurationAwareModule
{
Expand Down

0 comments on commit c82bddb

Please sign in to comment.