Skip to content

Commit 57efd4c

Browse files
committed
fix: review fix
1 parent 0349e8e commit 57efd4c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/main/java/io/supertokens/storage/postgresql/Start.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,15 +3587,14 @@ public int getDbActivityCount(String dbname) throws SQLException, StorageQueryEx
35873587
});
35883588
}
35893589

3590-
// TODO make it transaction wrapped, to be as similar to mysql as possible
35913590
@Override
35923591
public void addBulkImportUsers(AppIdentifier appIdentifier, List<BulkImportUser> users)
35933592
throws StorageQueryException,
35943593
TenantOrAppNotFoundException {
35953594
try {
35963595
this.startTransaction(con -> {
35973596
try {
3598-
BulkImportQueries.insertBulkImportUsers(this, (Connection) con.getConnection(), appIdentifier, users);
3597+
BulkImportQueries.insertBulkImportUsers_Transaction(this, (Connection) con.getConnection(), appIdentifier, users);
35993598
} catch (SQLException e) {
36003599
if (e instanceof PSQLException) {
36013600
ServerErrorMessage serverErrorMessage = ((PSQLException) e).getServerErrorMessage();

src/main/java/io/supertokens/storage/postgresql/queries/BulkImportQueries.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static String getQueryToCreatePaginationIndex2(Start start) {
7474
+ Config.getConfig(start).getBulkImportUsersTable() + " (app_id, created_at DESC, id DESC)";
7575
}
7676

77-
public static void insertBulkImportUsers(Start start, Connection connection, AppIdentifier appIdentifier, List<BulkImportUser> users)
77+
public static void insertBulkImportUsers_Transaction(Start start, Connection connection, AppIdentifier appIdentifier, List<BulkImportUser> users)
7878
throws SQLException, StorageQueryException {
7979
String queryBuilder = "INSERT INTO " + Config.getConfig(start).getBulkImportUsersTable() +
8080
" (id, app_id, raw_data, created_at, updated_at) VALUES "

0 commit comments

Comments
 (0)