9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-19 14:59:21 +00:00

fix: Postgres syntax issue, close #545

This commit is contained in:
William278
2025-08-12 23:23:46 +01:00
parent 1d850a9ddb
commit 11453393d4

View File

@@ -297,9 +297,9 @@ public class PostgresDatabase extends Database {
public int getUnpinnedSnapshotCount(@NotNull User user) { public int getUnpinnedSnapshotCount(@NotNull User user) {
try (Connection connection = getConnection()) { try (Connection connection = getConnection()) {
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables(""" try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
SELECT COUNT(`version_uuid`) SELECT COUNT(version_uuid)
FROM `%user_data_table%` FROM %user_data_table%
WHERE `player_uuid`=? AND `pinned`=false;"""))) { WHERE player_uuid=? AND pinned=false;"""))) {
statement.setString(1, user.getUuid().toString()); statement.setString(1, user.getUuid().toString());
final ResultSet resultSet = statement.executeQuery(); final ResultSet resultSet = statement.executeQuery();
if (resultSet.next()) { if (resultSet.next()) {