Improve sql query

This commit is contained in:
AsamK 2024-02-10 12:24:13 +01:00
parent e78146eb67
commit ed4b1e8f02

View file

@ -891,13 +891,12 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re
final var sql = (
"""
UPDATE %s
SET unregistered_timestamp = ?
SET unregistered_timestamp = NULL
WHERE _id = ?
"""
).formatted(TABLE_RECIPIENT);
try (final var statement = connection.prepareStatement(sql)) {
statement.setNull(1, Types.INTEGER);
statement.setLong(2, recipientId.id());
statement.setLong(1, recipientId.id());
statement.executeUpdate();
}
}