Comparing version 2.4.0 to 2.5.0
2.5.0 / 2016-06-07 | ||
================== | ||
* feat: support end() | ||
2.4.0 / 2016-06-07 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -104,1 +104,15 @@ 'use strict'; | ||
}; | ||
proto.end = function(callback) { | ||
// callback style | ||
if (callback) return this.pool.end(callback); | ||
// promise style | ||
const that = this; | ||
return new Promise(function(resolve, reject) { | ||
that.pool.end(function(err) { | ||
if (err) return reject(err); | ||
resolve(); | ||
}); | ||
}); | ||
}; |
{ | ||
"name": "ali-rds", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Aliyun RDS client", | ||
@@ -21,2 +21,3 @@ "main": "lib/client.js", | ||
"autod": "*", | ||
"co": "^4.6.0", | ||
"co-mocha": "*", | ||
@@ -23,0 +24,0 @@ "istanbul": "*", |
@@ -35,3 +35,3 @@ ali-rds | ||
let db = rds({ | ||
const db = rds({ | ||
host: 'your-rds-address.mysql.rds.aliyuncs.com', | ||
@@ -42,4 +42,17 @@ port: 3306, | ||
database: 'your-database-name', | ||
// optional params | ||
// The charset for the connection. | ||
// This is called "collation" in the SQL-level of MySQL (like utf8_general_ci). | ||
// If a SQL-level charset is specified (like utf8mb4) | ||
// then the default collation for that charset is used. (Default: 'UTF8_GENERAL_CI') | ||
// charset: 'utf8_general_ci', | ||
// | ||
// The maximum number of connections to create at once. (Default: 10) | ||
// connectionLimit: 10, | ||
// | ||
// The maximum number of connection requests the pool will queue | ||
// before returning an error from getConnection. | ||
// If set to 0, there is no limit to the number of queued connection requests. (Default: 0) | ||
// queueLimit: 0, | ||
}); | ||
@@ -46,0 +59,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22130
436
357
6