Skip to content

Commit

Permalink
Update PostgresStorageAdapter.js (parse-community#6981)
Browse files Browse the repository at this point in the history
* Update PostgresStorageAdapter.js

Start moving toward better, ES7 syntax.

* Update PostgresStorageAdapter.js

Fixing spaces 🤦‍♂️
  • Loading branch information
vitaly-t authored and dblythy committed Dec 14, 2020
1 parent e84958d commit 7ecf264
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/Adapters/Storage/Postgres/PostgresStorageAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2463,20 +2463,19 @@ export class PostgresStorageAdapter implements StorageAdapter {
});
return Promise.all(promises)
.then(() => {
return this._client.tx('perform-initialization', t => {
return t.batch([
t.none(sql.misc.jsonObjectSetKeys),
t.none(sql.array.add),
t.none(sql.array.addUnique),
t.none(sql.array.remove),
t.none(sql.array.containsAll),
t.none(sql.array.containsAllRegex),
t.none(sql.array.contains),
]);
return this._client.tx('perform-initialization', async t => {
await t.none(sql.misc.jsonObjectSetKeys);
await t.none(sql.array.add);
await t.none(sql.array.addUnique);
await t.none(sql.array.remove);
await t.none(sql.array.containsAll);
await t.none(sql.array.containsAllRegex);
await t.none(sql.array.contains);
return t.ctx;
});
})
.then(data => {
debug(`initializationDone in ${data.duration}`);
.then(ctx => {
debug(`initializationDone in ${ctx.duration}`);
})
.catch(error => {
/* eslint-disable no-console */
Expand Down

0 comments on commit 7ecf264

Please sign in to comment.