mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
fix: undefined values
Various mistakes from 1.8.1
This commit is contained in:
1 parent
b7763141b7
commit
94fe76340e
4 files changed
+6
-5
No files matched your search
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user