Allow properties to pass through mysql driver
See https://github.com/strongloop/loopback-connector-mysql/issues/46
This commit is contained in:
parent
abaabff01a
commit
8f62b08e70
|
@ -54,6 +54,14 @@ exports.initialize = function initializeDataSource(dataSource, callback) {
|
|||
options.database = s.database;
|
||||
}
|
||||
|
||||
// Take other options for mysql driver
|
||||
// See https://github.com/strongloop/loopback-connector-mysql/issues/46
|
||||
for (var p in s) {
|
||||
if (options[p] === undefined) {
|
||||
options[p] = s[p];
|
||||
}
|
||||
}
|
||||
|
||||
dataSource.client = mysql.createPool(options);
|
||||
|
||||
dataSource.client.on('error', function (err) {
|
||||
|
|
Loading…
Reference in New Issue