fix: undefined values

Various mistakes from 1.8.1
This commit is contained in:
Linden committed 2021-12-02 19:32:38 +11:00
1 parent b7763141b7
commit 94fe76340e
4 files changed
+6 -5

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ if (connectionString === '') {
const dbOptions = (() => {
const options = connectionString.includes('mysql://')
? { uri: connectionString }
: (options = connectionString
: connectionString
.replace(/(?:host(?:name)|ip|server|data\s?source|addr(?:ess)?)=/gi, 'host=')
.replace(/(?:user\s?(?:id|name)?|uid)=/gi, 'user=')
.replace(/(?:pwd|pass)=/gi, 'password=')
@@ -20,7 +20,7 @@ const dbOptions = (() => {
const [key, value] = parameter.split('=');
connectionInfo[key] = value;
return connectionInfo;
}, {}));
}, {});
options.namedPlaceholders = true;
options.typeCast = parseTypes;