feat: added a new batch insert operation to convert inserts into chunks and updated secret migration

This commit is contained in:
=
2024-08-09 21:02:26 +05:30
parent ea14df2cbd
commit 32a84471f2
4 changed files with 19 additions and 9 deletions
@@ -287,7 +287,7 @@ export const secretV2BridgeDALFactory = (db: TDbClient) => {
}))
);
if (!newSecretReferences.length) return;
const secretReferences = await (tx || db)(TableName.SecretReferenceV2).insert(newSecretReferences);
const secretReferences = await (tx || db).batchInsert(TableName.SecretReferenceV2, newSecretReferences);
return secretReferences;
} catch (error) {
throw new DatabaseError({ error, name: "UpsertSecretReference" });