Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
"defaultValue": ""
},
{
"inputLabel": "Schema name",
"inputLabel": "Database name",
"inputKeyword": "databaseName",
"inputType": "text",
"inputPlaceholder": "Optional"
"inputTooltip": "Optionally specify the database name. If not provided, you will be asked for it after connection."
}
]
},
Expand Down
11 changes: 9 additions & 2 deletions reverse_engineering/helpers/snowflakeHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ const connect = async (
databaseName,
},
) => {
if (connection) {
logger.log('info', 'connection already exists', 'Connection');

return connection;
}

const account = getAccount(host);
const accessUrl = getAccessUrl(account);
const timeout = _.toNumber(queryRequestTimeout) || 2 * 60 * 1000;
Expand All @@ -55,8 +61,8 @@ const connect = async (
`Auth type: ${authType}\n` +
`Username: ${username}\n` +
`Warehouse: ${warehouse}\n` +
`Role: ${role}\n`,
`Schema name: ${databaseName}`,
`Role: ${role}\n` +
`Database name: ${databaseName}`,
'Connection',
);

Expand Down Expand Up @@ -465,6 +471,7 @@ const disconnect = () => {
if (err) {
return reject(err);
}
connection = null;
resolve();
});
});
Expand Down