Skip to content

Commit 82cd275

Browse files
authored
Update PostgresStorageAdapter.js (#6981)
* Update PostgresStorageAdapter.js Start moving toward better, ES7 syntax. * Update PostgresStorageAdapter.js Fixing spaces 🤦‍♂️
1 parent 5f261cc commit 82cd275

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/Adapters/Storage/Postgres/PostgresStorageAdapter.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,20 +2463,19 @@ export class PostgresStorageAdapter implements StorageAdapter {
24632463
});
24642464
return Promise.all(promises)
24652465
.then(() => {
2466-
return this._client.tx('perform-initialization', t => {
2467-
return t.batch([
2468-
t.none(sql.misc.jsonObjectSetKeys),
2469-
t.none(sql.array.add),
2470-
t.none(sql.array.addUnique),
2471-
t.none(sql.array.remove),
2472-
t.none(sql.array.containsAll),
2473-
t.none(sql.array.containsAllRegex),
2474-
t.none(sql.array.contains),
2475-
]);
2466+
return this._client.tx('perform-initialization', async t => {
2467+
await t.none(sql.misc.jsonObjectSetKeys);
2468+
await t.none(sql.array.add);
2469+
await t.none(sql.array.addUnique);
2470+
await t.none(sql.array.remove);
2471+
await t.none(sql.array.containsAll);
2472+
await t.none(sql.array.containsAllRegex);
2473+
await t.none(sql.array.contains);
2474+
return t.ctx;
24762475
});
24772476
})
2478-
.then(data => {
2479-
debug(`initializationDone in ${data.duration}`);
2477+
.then(ctx => {
2478+
debug(`initializationDone in ${ctx.duration}`);
24802479
})
24812480
.catch(error => {
24822481
/* eslint-disable no-console */

0 commit comments

Comments
 (0)