Skip to content

Commit

Permalink
Fix IDTB#testUpdateWithPredicate
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacBlanco committed Dec 20, 2024
1 parent 21c3de6 commit 94cc4b3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2273,13 +2273,13 @@ public void testUpdateWithPredicates()
assertUpdate("UPDATE " + tableName + " SET email = '[email protected]' WHERE id in(1, 2, 3)", 3);
assertQuery("SELECT id, full_name, email FROM " + tableName, "VALUES (1, 'aaaa', '[email protected]'), (2, 'ssss', '[email protected]'), (3, 'ssss', '[email protected]'), (4, 'dddd', '[email protected]') ");

// set values to null
// set all values to null
assertUpdate("UPDATE " + tableName + " SET email = NULL", 4);
assertQuery("SELECT email FROM " + tableName + " WHERE email is NULL", "VALUES NULL");
assertQuery("SELECT email FROM " + tableName + " WHERE email is NULL", "VALUES NULL, NULL, NULL, NULL");

// update nulls to non-null
assertUpdate("UPDATE " + tableName + " SET email = '[email protected]' WHERE full_name is NULL", 1);
assertQuery("SELECT email FROM " + tableName + "WHERE email is NULL", "VALUES '[email protected]'");
assertUpdate("UPDATE " + tableName + " SET email = '[email protected]' WHERE email is NULL", 4);
assertQuery("SELECT count(*) FROM " + tableName + " WHERE email is not NULL", "VALUES 4");
}

@Test
Expand Down

0 comments on commit 94cc4b3

Please sign in to comment.