diff --git a/src/main/java/io/supertokens/storage/postgresql/Start.java b/src/main/java/io/supertokens/storage/postgresql/Start.java index 52d8fa28..ce0d27f2 100644 --- a/src/main/java/io/supertokens/storage/postgresql/Start.java +++ b/src/main/java/io/supertokens/storage/postgresql/Start.java @@ -26,7 +26,6 @@ import io.supertokens.pluginInterface.authRecipe.LoginMethod; import io.supertokens.pluginInterface.authRecipe.sqlStorage.AuthRecipeSQLStorage; import io.supertokens.pluginInterface.bulkimport.BulkImportUser; -import io.supertokens.pluginInterface.bulkimport.BulkImportUserInfo; import io.supertokens.pluginInterface.bulkimport.sqlStorage.BulkImportSQLStorage; import io.supertokens.pluginInterface.dashboard.DashboardSearchTags; import io.supertokens.pluginInterface.dashboard.DashboardSessionInfo; @@ -3065,7 +3064,7 @@ public void addBulkImportUsers(AppIdentifier appIdentifier, List } @Override - public List getBulkImportUsers(AppIdentifier appIdentifier, @Nonnull Integer limit, @Nullable BulkImportUserStatus status, + public List getBulkImportUsers(AppIdentifier appIdentifier, @Nonnull Integer limit, @Nullable BulkImportUserStatus status, @Nullable String bulkImportUserId, @Nullable Long createdAt) throws StorageQueryException { try { return BulkImportQueries.getBulkImportUsers(this, appIdentifier, limit, status, bulkImportUserId, createdAt); diff --git a/src/main/java/io/supertokens/storage/postgresql/queries/BulkImportQueries.java b/src/main/java/io/supertokens/storage/postgresql/queries/BulkImportQueries.java index 688983e4..4c77b1a1 100644 --- a/src/main/java/io/supertokens/storage/postgresql/queries/BulkImportQueries.java +++ b/src/main/java/io/supertokens/storage/postgresql/queries/BulkImportQueries.java @@ -31,7 +31,6 @@ import io.supertokens.pluginInterface.RowMapper; import io.supertokens.pluginInterface.bulkimport.BulkImportStorage.BulkImportUserStatus; import io.supertokens.pluginInterface.bulkimport.BulkImportUser; -import io.supertokens.pluginInterface.bulkimport.BulkImportUserInfo; import io.supertokens.pluginInterface.exceptions.StorageQueryException; import io.supertokens.pluginInterface.multitenancy.AppIdentifier; import io.supertokens.storage.postgresql.Start; @@ -126,7 +125,7 @@ public static void updateBulkImportUserStatus_Transaction(Start start, Connectio }); } - public static List getBulkImportUsers(Start start, AppIdentifier appIdentifier, @Nonnull Integer limit, @Nullable BulkImportUserStatus status, + public static List getBulkImportUsers(Start start, AppIdentifier appIdentifier, @Nonnull Integer limit, @Nullable BulkImportUserStatus status, @Nullable String bulkImportUserId, @Nullable Long createdAt) throws SQLException, StorageQueryException { @@ -161,27 +160,27 @@ public static List getBulkImportUsers(Start start, AppIdenti pst.setObject(i + 1, parameters.get(i)); } }, result -> { - List bulkImportUsers = new ArrayList<>(); + List bulkImportUsers = new ArrayList<>(); while (result.next()) { - bulkImportUsers.add(BulkImportUserInfoRowMapper.getInstance().mapOrThrow(result)); + bulkImportUsers.add(BulkImportUserRowMapper.getInstance().mapOrThrow(result)); } return bulkImportUsers; }); } - private static class BulkImportUserInfoRowMapper implements RowMapper { - private static final BulkImportUserInfoRowMapper INSTANCE = new BulkImportUserInfoRowMapper(); + private static class BulkImportUserRowMapper implements RowMapper { + private static final BulkImportUserRowMapper INSTANCE = new BulkImportUserRowMapper(); - private BulkImportUserInfoRowMapper() { + private BulkImportUserRowMapper() { } - private static BulkImportUserInfoRowMapper getInstance() { + private static BulkImportUserRowMapper getInstance() { return INSTANCE; } @Override - public BulkImportUserInfo map(ResultSet result) throws Exception { - return new BulkImportUserInfo(result.getString("id"), result.getString("raw_data"), + public BulkImportUser map(ResultSet result) throws Exception { + return BulkImportUser.fromDBJson(result.getString("id"), result.getString("raw_data"), BulkImportUserStatus.valueOf(result.getString("status")), result.getLong("created_at"), result.getLong("updated_at")); }