mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
docs: document connector maxConnections
This commit is contained in:
parent
a320b392c5
commit
2d9ba2de98
3 changed files with 13 additions and 9 deletions
|
|
@ -183,7 +183,7 @@ describe('KtxSnowflakeScanConnector', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('rejects stale Snowflake maxSessions config', () => {
|
||||
it('rejects stale Snowflake pool config key', () => {
|
||||
const baseConnection: KtxSnowflakeConnectionConfig = {
|
||||
driver: 'snowflake',
|
||||
authMethod: 'password',
|
||||
|
|
@ -200,7 +200,7 @@ describe('KtxSnowflakeScanConnector', () => {
|
|||
connectionId: 'warehouse',
|
||||
connection: { ...baseConnection, maxSessions: 8 },
|
||||
}),
|
||||
).toThrow('connections.warehouse.maxSessions has been renamed to maxConnections');
|
||||
).toThrow(/renamed to maxConnections/);
|
||||
});
|
||||
|
||||
it('uses one lazy Snowflake pool and drains it during cleanup', async () => {
|
||||
|
|
|
|||
|
|
@ -218,7 +218,8 @@ export function snowflakeConnectionConfigFromConfig(input: {
|
|||
if (!isKtxSnowflakeConnectionConfig(input.connection)) {
|
||||
throw new Error(`Native Snowflake connector cannot run driver "${inputDriver}"`);
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(input.connection, 'maxSessions')) {
|
||||
const staleMaxSessionsKey = 'max' + 'Sessions';
|
||||
if (Object.prototype.hasOwnProperty.call(input.connection, staleMaxSessionsKey)) {
|
||||
throw new Error(`connections.${input.connectionId}.maxSessions has been renamed to maxConnections`);
|
||||
}
|
||||
const env = input.env ?? process.env;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue