@@ -36,36 +36,46 @@ if (EXPORT_DOCS) {
36
36
...DEFAULT_POOL_CONFIG ,
37
37
connectionString : PG_CONNECTION ,
38
38
} )
39
- const { data : schemas , error : schemasError } = await pgMeta . schemas . list ( )
40
- const { data : tables , error : tablesError } = await pgMeta . tables . list ( {
41
- includedSchemas :
42
- GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
43
- includeColumns : false ,
44
- } )
45
- const { data : views , error : viewsError } = await pgMeta . views . list ( {
46
- includedSchemas :
47
- GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
48
- includeColumns : false ,
49
- } )
50
- const { data : materializedViews , error : materializedViewsError } =
51
- await pgMeta . materializedViews . list ( {
39
+ const [
40
+ { data : schemas , error : schemasError } ,
41
+ { data : tables , error : tablesError } ,
42
+ { data : views , error : viewsError } ,
43
+ { data : materializedViews , error : materializedViewsError } ,
44
+ { data : columns , error : columnsError } ,
45
+ { data : relationships , error : relationshipsError } ,
46
+ { data : functions , error : functionsError } ,
47
+ { data : types , error : typesError }
48
+ ] = await Promise . all ( [
49
+ pgMeta . schemas . list ( ) ,
50
+ pgMeta . tables . list ( {
51
+ includedSchemas :
52
+ GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
53
+ includeColumns : false ,
54
+ } ) ,
55
+ pgMeta . views . list ( {
56
+ includedSchemas :
57
+ GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
58
+ includeColumns : false ,
59
+ } ) ,
60
+ pgMeta . materializedViews . list ( {
52
61
includedSchemas :
53
62
GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
54
63
includeColumns : false ,
64
+ } ) ,
65
+ pgMeta . columns . list ( {
66
+ includedSchemas :
67
+ GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
68
+ } ) ,
69
+ pgMeta . relationships . list ( ) ,
70
+ pgMeta . functions . list ( {
71
+ includedSchemas :
72
+ GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
73
+ } ) ,
74
+ pgMeta . types . list ( {
75
+ includeArrayTypes : true ,
76
+ includeSystemSchemas : true ,
55
77
} )
56
- const { data : columns , error : columnsError } = await pgMeta . columns . list ( {
57
- includedSchemas :
58
- GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
59
- } )
60
- const { data : relationships , error : relationshipsError } = await pgMeta . relationships . list ( )
61
- const { data : functions , error : functionsError } = await pgMeta . functions . list ( {
62
- includedSchemas :
63
- GENERATE_TYPES_INCLUDED_SCHEMAS . length > 0 ? GENERATE_TYPES_INCLUDED_SCHEMAS : undefined ,
64
- } )
65
- const { data : types , error : typesError } = await pgMeta . types . list ( {
66
- includeArrayTypes : true ,
67
- includeSystemSchemas : true ,
68
- } )
78
+ ] ) ;
69
79
await pgMeta . end ( )
70
80
71
81
if ( schemasError ) {
0 commit comments