Skip to content

Commit

Permalink
Fix Sqlite createOrUpdate query
Browse files Browse the repository at this point in the history
  • Loading branch information
Brikster committed Dec 22, 2023
1 parent edbfb0f commit d60efce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public SqlitePlayerDataRepository(Path dataFolder) {
public void createOrUpdateUser(@NotNull UUID uuid, @NotNull String username) {
try (Connection connection = dataSource.getConnection();
PreparedStatement statement = connection.prepareStatement(
"INSERT INTO users (uuid, username) VALUES (?, ?) ON CONFLICT (uuid, username) DO UPDATE SET username = ?")) {
"INSERT INTO users (uuid, username) VALUES (?, ?) ON CONFLICT (uuid) DO UPDATE SET username = ?")) {
statement.setBytes(1, SqliteUtil.fromUUID(uuid));
statement.setString(2, username);
statement.setString(3, username);
Expand Down

0 comments on commit d60efce

Please sign in to comment.