Save gender to PG

This commit is contained in:
P0nk
2024-09-27 23:08:12 +02:00
parent 5abae50be5
commit 439280947c
6 changed files with 91 additions and 26 deletions

View File

@@ -73,6 +73,19 @@ public class AccountRepository {
}
}
public boolean setGender(int accountId, byte gender) {
String sql = """
UPDATE account
SET gender = :gender
WHERE id = :id""";
try (Handle handle = connection.getHandle()) {
return handle.createUpdate(sql)
.bind("id", accountId)
.bind("gender", gender)
.execute() > 0;
}
}
public boolean setPin(int accountId, String pin) {
String sql = """
UPDATE account