Skip to content

Commit 9095627

Browse files
committed
parallel versions
1 parent 5f80c5f commit 9095627

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

generator/generate.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,14 @@ const legacyTypes = {
5050
async function generate () {
5151
console.log('Starting PostgreSQL type generation...')
5252

53-
// Query all available PostgreSQL versions
53+
// Query all available PostgreSQL versions in parallel
54+
const typeResults = await Promise.all(
55+
postgresVersions.map(version => queryPostgresVersion(version))
56+
)
57+
58+
// Merge all types from different versions
5459
let allTypes = {}
55-
for (const version of postgresVersions) {
56-
const types = await queryPostgresVersion(version)
60+
for (const types of typeResults) {
5761
allTypes = { ...allTypes, ...types }
5862
}
5963

0 commit comments

Comments
 (0)