Allow properties to pass through mysql driver

See https://github.com/strongloop/loopback-connector-mysql/issues/46
This commit is contained in:
Raymond Feng 2014-08-15 16:27:12 -07:00
parent abaabff01a
commit 8f62b08e70
1 changed files with 8 additions and 0 deletions

View File

@ -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) {