@bytebase/dbhub 1.2.5 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/{chunk-A4TSDCPY.js → chunk-6SZKW6GD.js} +1 -1
- package/dist/{chunk-VDA5BVNE.js → chunk-77BJNE6E.js} +87 -57
- package/dist/{chunk-IQRBLAB4.js → chunk-ABTVMHD6.js} +40 -10
- package/dist/{chunk-MF6LSVWK.js → chunk-IXC4NQGC.js} +29 -3
- package/dist/{chunk-JFWX35TB.js → chunk-X2EC47W4.js} +1 -0
- package/dist/chunk-YIGJHEU6.js +343 -0
- package/dist/index.js +16 -15
- package/dist/{mariadb-EVJ5HLYH.js → mariadb-L7Z55ROY.js} +6 -5
- package/dist/{mysql-GXDUNLJ6.js → mysql-XXIHWQGR.js} +6 -5
- package/dist/oracle-OUKBU52X.js +754 -0
- package/dist/{postgres-M3W3Y6F5.js → postgres-6XJ7V4J4.js} +13 -6
- package/dist/public/assets/{index-BdBaFSHd.js → index-BRlIJaqn.js} +27 -27
- package/dist/public/index.html +1 -1
- package/dist/{registry-UF3N2H4G.js → registry-P4IGJ56H.js} +2 -2
- package/dist/{sqlite-ASYMU5BI.js → sqlite-AO2BKIC6.js} +22 -10
- package/dist/{sqlserver-WNVSBFJ3.js → sqlserver-AJUK6L55.js} +10 -18
- package/package.json +5 -2
- package/dist/chunk-6QETXS44.js +0 -254
|
@@ -3,17 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-FU2ZJE4E.js";
|
|
4
4
|
import {
|
|
5
5
|
quoteIdentifier
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X2EC47W4.js";
|
|
7
7
|
import {
|
|
8
8
|
SQLRowLimiter,
|
|
9
9
|
closeQuietly
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YIGJHEU6.js";
|
|
11
|
+
import "./chunk-ABTVMHD6.js";
|
|
11
12
|
import {
|
|
12
13
|
ConnectorRegistry,
|
|
13
14
|
SafeURL,
|
|
14
15
|
obfuscateDSNPassword,
|
|
15
16
|
splitSQLStatements
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IXC4NQGC.js";
|
|
17
18
|
|
|
18
19
|
// src/connectors/postgres/index.ts
|
|
19
20
|
import fs from "fs";
|
|
@@ -62,6 +63,7 @@ var PostgresDSNParser = class {
|
|
|
62
63
|
async parse(dsn, config) {
|
|
63
64
|
const connectionTimeoutSeconds = config?.connectionTimeoutSeconds;
|
|
64
65
|
const queryTimeoutSeconds = config?.queryTimeoutSeconds;
|
|
66
|
+
const poolMaxConnections = config?.poolMaxConnections;
|
|
65
67
|
if (!this.isValidDSN(dsn)) {
|
|
66
68
|
const obfuscatedDSN = obfuscateDSNPassword(dsn);
|
|
67
69
|
const expectedFormat = this.getSampleDSN();
|
|
@@ -121,6 +123,9 @@ Expected: ${expectedFormat}`
|
|
|
121
123
|
poolConfig.statement_timeout = queryTimeoutMs;
|
|
122
124
|
poolConfig.query_timeout = queryTimeoutMs + POSTGRES_CLIENT_QUERY_TIMEOUT_GRACE_MS;
|
|
123
125
|
}
|
|
126
|
+
if (poolMaxConnections !== void 0) {
|
|
127
|
+
poolConfig.max = poolMaxConnections;
|
|
128
|
+
}
|
|
124
129
|
return poolConfig;
|
|
125
130
|
} catch (error) {
|
|
126
131
|
if (error instanceof FailedToReadCertificate) {
|
|
@@ -297,7 +302,7 @@ var PostgresConnector = class _PostgresConnector {
|
|
|
297
302
|
`
|
|
298
303
|
SELECT
|
|
299
304
|
i.relname as index_name,
|
|
300
|
-
array_agg(a.attname) as column_names,
|
|
305
|
+
array_agg(a.attname::text) as column_names,
|
|
301
306
|
ix.indisunique as is_unique,
|
|
302
307
|
ix.indisprimary as is_primary
|
|
303
308
|
FROM
|
|
@@ -595,7 +600,8 @@ var PostgresConnector = class _PostgresConnector {
|
|
|
595
600
|
if (statements.length === 1) {
|
|
596
601
|
const { sql: processedStatement, probeApplied } = SQLRowLimiter.applyMaxRowsWithTruncationProbe(
|
|
597
602
|
statements[0],
|
|
598
|
-
options.maxRows
|
|
603
|
+
options.maxRows,
|
|
604
|
+
"postgres"
|
|
599
605
|
);
|
|
600
606
|
if (options.readonly) {
|
|
601
607
|
await client.query("BEGIN READ ONLY");
|
|
@@ -640,7 +646,8 @@ var PostgresConnector = class _PostgresConnector {
|
|
|
640
646
|
for (let statement of statements) {
|
|
641
647
|
const { sql: processedStatement, probeApplied } = SQLRowLimiter.applyMaxRowsWithTruncationProbe(
|
|
642
648
|
statement,
|
|
643
|
-
options.maxRows
|
|
649
|
+
options.maxRows,
|
|
650
|
+
"postgres"
|
|
644
651
|
);
|
|
645
652
|
const result = await client.query(processedStatement);
|
|
646
653
|
const resultSet = {
|